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.

General Questions /

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

Using InSection for admin


Reply


5 Posts   1082 Views

Avatar
sca123

Community Member, 61 Posts

1 August 2009 at 3:48am

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

Thanks

Avatar
Double-A-Ron

Community Member, 604 Posts

1 August 2009 at 9:01am

Hi there,

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

Cheers
Aaron

Avatar
sca123

Community Member, 61 Posts

2 August 2009 at 4:13am

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.

Avatar
martimiz

Forum Moderator, 1106 Posts

2 August 2009 at 9:02pm

Something like this?

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

Avatar
sca123

Community Member, 61 Posts

3 August 2009 at 8:18am

Thank you. This works 100%