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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Template Questions /

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

Template <% include %>

Go to End

4 Posts   789 Views


Community Member, 95 Posts

7 October 2011 at 1:24am

Hey guys,

I have this issue, I have a that every other page extends and it has all of the fetures and includes iwish to show on every page, except <% include breadcrumbs %> that i want to include in every page EXCEPT forum. Now, it's a bit frustrating, but I don't rly want it to be shown in forum and it is, on the other hand i don't want to remove the include from and place it on every other page except forum. How do I block it from being included in forum?


Community Member, 344 Posts

7 October 2011 at 3:46am

If you are using the forum module, then simply delete "<p>$Breadcrumbs</p>" from Includes/

If your in your root template folder contains this breadcrumb include, then copy this file, rename the copy to and delete the include line from this file. Duplicate again and rename it to So now we have two new 'root' templates responsible for both ForumPage classes.

... Although it is probably a better idea to move this include from templates/ to the appropriate layout templates in tempate/Layout/.


Community Member, 473 Posts

7 October 2011 at 8:14am

Assuming your forum's URLSegment is forum:

<% if InSection(forum) %><% else %>
	<% include breadcrumbs %>
<% end_if %>


Community Member, 95 Posts

7 October 2011 at 9:30pm

Thank you Simon, I've handeled it in a similar way. The thing is include shouldn't be moved to Layout pages cause there are like 20 different pages so it's better to leave it in a single place on and just use the if clause to ban the pages you don't want to include it. I've done it with if ClassName!=Forum or sth similar