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.

Template Questions /

Newbie question - can I realize this template with SilverStripe?


Reply


3 Posts   1520 Views

Avatar
yeticomes

Community Member, 2 Posts

28 November 2009 at 1:19pm

Hello,

I want to build my website with a new, simple cms (I am using Joomla until now) and would like to know if I can realize the theme I have attached with SilverStripe.

Can you please give me your opinion if it is possible for a beginner?

Thanx a lot in advance!

Attached Files
Avatar
Willr

Forum Moderator, 5513 Posts

28 November 2009 at 9:21pm

You have 100% control over the templates so yes something like that is possible. The trickest part is that menu on the right. For that you have a couple options - you could hard code the paths / styles in the templates for the menu for example instead of

<ul>
<% control Menu(1) %>
<li>
...

You would just hard code the menu with the a classname for styling like

<ul>
<li><a href="home/" class="home">Home</a></li>
...

This has the benefit of if the user creates another menu item it won't break the menu (as you can't really have that dynamic length without some really fancy stuff. I would lent towards this method just because thats such a delicate menu. The other option is to use the $URLSegment on each <li> in the control loop and then you can apply styles to those css classes in your css file

<ul>
<% control Menu(1) %>
<li class="$URLSegment">...</li>
..

Then you would style classes .home, .services etc. This method works but if the cms user creates another page it will break the menu, if they change the page url it will break the menu. Which is why I reckon hardcoding the menu is probably the most straightforward approach.

Avatar
yeticomes

Community Member, 2 Posts

29 November 2009 at 2:25am

Thank you very much for your support - sounds a little bit tricky :-)

I will install a demo of SilverStripe & dive in the docu to see if it is not to complicated for me (sorry, I do no longer want Joomla, but it's out-of-the box Templates were really easy - but it is not the same look like this template)