Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Page Type control?

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

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

Page: 1
Go to End
Author Topic: 1108 Views
  • NickJacobs
    Avatar
    Community Member
    144 Posts

    Page Type control? Link to this post

    Hi, is there any way of testing for a particular page type? For example, I only want to include certain code on gallery pages .... is there any way of doing something like this:

    <% if PageType = GalleryPage %>
    ....
    do something
    ....
    <% end_if %>

  • ajshort
    Avatar
    Community Member
    244 Posts

    Re: Page Type control? Link to this post

    Hi galilee,

    you can just use something like this in your template:

    <% if ClassName = GalleryPage %>

    1108 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.