Jump to:

23551 Posts in 19348 Topics by 2891 members

General Questions

SilverStripe Forums » General Questions » Need to check <% if Parent %>

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

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

Page: 1
Go to End
Author Topic: 487 Views
  • wilsonStaff
    Avatar
    Community Member
    142 Posts

    Need to check <% if Parent %> Link to this post

    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!

  • n0ne
    Avatar
    Community Member
    18 Posts

    Re: Need to check <% if Parent %> Link to this post

    Try $Parent.Title

    487 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.