Jump to:

5514 Posts in 1733 Topics by 1219 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Display results based on a custom field

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 988 Views
  • neogin
    Avatar
    Community Member
    13 Posts

    Display results based on a custom field Link to this post

    Hi guys,

    first of all I'm new to SS and english is not my mother-tongue so please excuse my mistakes.

    So, I'm making a website with different scientific articles by different authors. So far here's my structure for the article part (photo8). As you can see the article have a classic structure but I added the custom field "theme".

    I used that structure because I wanted to be able to display for each author an "Author page" wich display all his publications. Then I used the <%Control Children%> to display the publications. It works great.

    But now I would like to create a page for each theme displaying the relevant publications. As the author can enter more than one theme in the $theme, my idea was to use a sort of custom search based on the content of the $theme, and display the result.

    For example, Author 1 writes a publication and in the theme part he writes " Biology Lasers " 'cause the subject is about about biology and lasers. Author 2 writes a publication about biology so he write in the theme part " Biology ".
    To be able to display in one page the list of publications about biology, I though that the simpliest solution was to display on the theme:biology page the result of a search that searches all the articles which $theme contains "Biology" so it would display the publication from Author 1 and 2 .

    But so far I havent been able to set the code for that kind of search, that searches only in one designated field.

    Do you have any idea ?

    Best,
    gautier

    Attached Files
    988 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.