3312 Posts in 889 Topics by 834 members
|Go to End|
7 October 2011 at 1:24am
I have this issue, I have a Page.ss 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 Page.ss and place it on every other page except forum. How do I block it from being included in forum?
7 October 2011 at 3:46am
If you are using the forum module, then simply delete "<p>$Breadcrumbs</p>" from Includes/ForumHeader.ss.
If your Page.ss in your root template folder contains this breadcrumb include, then copy this file, rename the copy to ForumHolder.ss and delete the include line from this file. Duplicate ForumHolder.ss again and rename it to Forum.ss. 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/Page.ss to the appropriate layout templates in tempate/Layout/.
7 October 2011 at 8:14am
Assuming your forum's URLSegment is forum:
<% if InSection(forum) %><% else %>
<% include breadcrumbs %>
<% end_if %>
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 Page.ss 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
|Go to Top|