How would I use <% if InSection(page-url) %> for the admin/log in page.
Thanks
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
How would I use <% if InSection(page-url) %> for the admin/log in page.
Thanks
Hi there,
It might help to explain exactly what you are trying to do.
Cheers
Aaron
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.
Something like this?
<% if ElementName != Security %>
...
<% end_if %>
Thank you. This works 100%