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.

Archive

Our old forums are still available as a read-only archive.

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

Templates: what sites are you making with SilverStripe?


Reply

12 Posts   5399 Views

Avatar
Sean

15 February 2007 at 6:23pm Forum Moderator, 921 Posts

The way we do things like navigation, are through page controls. eg.

<ul id="Menu1">
<% control Menu(1) %>
<li class="$LinkingMode"><a href="$Link" title="Go to the $Title page">$MenuTitle</a></li>
<% end_control %>
</ul>

What this does is take the first level of menu in the 'site tree', the way we organise pages within the SilverStripe CMS. It is done in a similar way to the windows explorer directory listing.

The same example can be done using <% control Menu(2) %> where it will take the second level pages instead of the first. You can also nest them to achieve a nice structure on your site.

I would suggest taking a look at this, since we believe this is a very simple way of creating navigation. You can even create sub-navigation items that are taken from another branch in the site tree. eg. I create a new page called 'Footer Navigation'. I would then use the following control to output all the pages (or children) underneath it.

<% control ChildrenOf(footer-navigation) %>

and you would do the same as above to create a <ul> with <li> elements inside.

Avatar
Matt Hardwick

21 August 2008 at 1:44am Community Member, 61 Posts

I am building a bi-lingual website for a student radio station.
Although if I am honest, for the complicated stuff (like the streaming page) I am using an actual PHP page.

Avatar
SimonBC

21 August 2008 at 7:58pm Community Member, 1 Post

I am looking at making a motorsports club site. I have done a BMX site - straight CSS etc but like a CMS to enable other club members to easily contribute in terms of news, event notifications, newsletters etc.

Avatar
Nivanka

23 August 2008 at 12:32am Community Member, 395 Posts

Sam,

I have a website where I put all my designs, they are all in PSD. My designs will be useful for you all too. And if there is any way that I can contribute drop a line.

my website is [url]http://templates.whynotonline.com[/url]

Nivanka