Login | Forgot password | Register

X

What is OpenID?

OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.

With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.

For more information visit the official OpenID site.

Jump to:

17478 Posts in 4473 Topics by 1972 members

Archive

SilverStripe Forums » Archive » How do I get the page type from the templatesystem?

Our old forums are still available as a read-only archive.

Page: 1
Go to End
Author Topic: How do I get the page type from the templatesystem? 770 Views
  • saimo
    avatar
    Community Member
    67 posts

    How do I get the page type from the templatesystem? Link to this post

    On my site I have a menu which is similar to a tree, which expands the nodes down to one level deeper than the current page. This is working fine, however, I don't want to show the children of a BlogHolder. Is this possible using only templating or do I have to subclass and override BlogHolder::Children (I'm using children for the menu)?

  • Hamish
    avatar
    Community Member
    608 posts

    Re: How do I get the page type from the templatesystem? Link to this post

    Use the tag "ClassName"

    Ie, if you put $ClassName in your template you'll see the page type.

    Or, to display the menu conditionally:

    <% if ClassName != BlogHolder %>

    <!-- your menu here -->

    <% end_if %>

    770 Views
Page: 1
Go to Top

Currently Online: Euphemismus

Welcome to our latest member: fearofbuttons

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

Comments on this website? Please give feedback.