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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

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

Hardcoding a part of the Navigation


Go to End


3 Posts   1417 Views

Avatar
baba-papa

Community Member, 279 Posts

15 October 2009 at 3:26am

Hi,

due to my page layout I am forced to hardcode some of my navigation links:

$BaseHref/contact/

This leads to the following output: www.mysite//contact
It works but it looks bad. Is there another way to hardcode navigation links?

Avatar
Willr

Forum Moderator, 5523 Posts

15 October 2009 at 1:47pm

$BaseHref includes a / (hence why you get 2 //) Just write it as {$BaseHref}contact.

Avatar
baba-papa

Community Member, 279 Posts

15 October 2009 at 5:14pm

Thanks, willr.