Jump to:

23358 Posts in 17875 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » Using InSection for admin

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: 1024 Views
  • sca123
    Avatar
    Community Member
    61 Posts

    Using InSection for admin Link to this post

    How would I use <% if InSection(page-url) %> for the admin/log in page.

    Thanks

  • Double-A-Ron
    Avatar
    Community Member
    604 Posts

    Re: Using InSection for admin Link to this post

    Hi there,

    It might help to explain exactly what you are trying to do.

    Cheers
    Aaron

  • sca123
    Avatar
    Community Member
    61 Posts

    Re: Using InSection for admin Link to this post

    Thanks for your reply.

    Nothing really difficult. The login page uses page.php template. This template has a side menu, which does not appear on the login page (as it does not have a "section"). This means that the formatting of the page goes a little odd with the login form appearing over the left hand side menu area.

    All I was going to do is load some other code to stop this happening IF its the login page.

    Hope that is clear - let me know if not.

  • martimiz
    Avatar
    Forum Moderator
    1067 Posts

    Re: Using InSection for admin Link to this post

    Something like this?

    <% if ElementName != Security %>
    ...
    <% end_if %>

  • sca123
    Avatar
    Community Member
    61 Posts

    Re: Using InSection for admin Link to this post

    Thank you. This works 100%

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