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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Need to check <% if Parent %>


Go to End


2 Posts   2214 Views

Avatar
wilsonStaff

Community Member, 143 Posts

13 September 2012 at 1:41am

Hi to all, first teh site is using 2.4.5

i nested my English version pages in a directory whose:
- title is English
- URL is english

I need to find a way to have my templates check IF these pages are indeed into English/, like this (know ots not working, but it tells you...)

<% if Parent = English %>

OR

<% if baseURL = english %>

Look at the images below. It will tell you more. Thanks!

Avatar
n0ne

Community Member, 18 Posts

13 September 2012 at 1:44am

Try $Parent.Title