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

How i can get a Link to Another SiteTree page in my Template


Go to End


2 Posts   1599 Views

Avatar
arturnav

Community Member, 1 Post

15 December 2011 at 9:33am

Hello

I guess this is a very noob question, I was looking in the forums but I don't get any answer or approach, basically one of my pages has many links to another sections, is like my home has links to News, Pictures, there is a someway in template to get the Sitetree link for a specific page?
I tried:

<% control Page(SomePage) %>$Title
<a href="$Link.Link">All News</a>
<% end_control %>

But nothings, maybe I'm just tired and need to rest to find the magic word, there is a buil-in funct for this?

Thanks in advance

Avatar
Bob Martin

Community Member, 5 Posts

17 December 2011 at 5:15am

If I got you right, you just need to use $Link instead of $Link.Link

greets