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:

Customising the CMS /

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

Customizing Menu

Go to End

2 Posts   1709 Views


Community Member, 2 Posts

30 June 2009 at 1:48am

Edited: 30/06/2009 1:51am

I am in the process of migrating a static PHP based site + Wordpress to SilverStripe.

In the static pages, we customize the header itself. We have two types of logins. Customers and Affiliates.

In the static site today, we do something like this:

<? require("_header_top.html"); ?>
<? if (isset($display_affiliate_link) && $display_affiliate_link == true) {
} else {
} ?>
<? require("_header_bottom.html"); ?>

This is the only difference in the Navigation menu between the affiliate and customer sections.

I tried going down the different layout path. But I don't prefer it as the layouts look 99% the same except for this one.

I tried the following hack, which works, but I don't like it at all.

<% if MenuTitle = Affiliate %>
<a href="/affiliate_login>affiliate login</a>
<% end_if %>
<a href="/subscriber_login>subscriber login</a>

Any suggestion on how I can achieve this more elegantly or a better recommended way to implement this?



Community Member, 97 Posts

19 December 2009 at 7:07pm

Edited: 19/12/2009 7:10pm

Vikram also asked this on StackOverflow:

Vikram, did you figure this out? It was a while back now but I'm going through a few unanswered questions, trying to make sure they got answered.