Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

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


Go to End

3 Posts   1963 Views


Community Member, 52 Posts

4 April 2009 at 7:40am

When I do
<% if ClassName = HomePage %> it returns ture on my search results! There are some bits that I don't wish to show on the results page that are on the Home page (for example I have a flash carousel that is controlled with a checkbox 'has_carousel').

I tried something like this:

<% if hasFlashCarousel %>
<% if ClassName = Page_results %>
... do nothing
<% else %>
include carousel...
<% end_if %>
<% end_if %>

but <% if ClassName = Page_results %> is not working... any ideas how i control this?


Forum Moderator, 5521 Posts

4 April 2009 at 6:25pm

In your function results() in mysite/code/Page.php add another entry to your return array(... ) bit

'ClassName' = 'Page_results'

as you call the results method on the current page you are viewing it inherits all the information from this page. So if you search from the homepage it does which loads the results but ontop of the home page. Passing the returned array another option should fix it


Community Member, 52 Posts

16 April 2009 at 12:21am

Edited: 16/04/2009 12:48am

Ah awesome thanks!

'ClassName' => 'Page_results'