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.

Template Questions

How to detect cms login page


Reply

5 Posts   1530 Views

Avatar
subpixel

30 August 2010 at 8:11pm Community Member, 4 Posts

I use for logging to cms page site.com/admin. It uses my page template, however I'd like to remove some elements in this login page.
I tried following two with no luck

<% if LoginForm %>
<% if URLSegment == admin %>


Any ideas? I'd prefer not to override Page.ss with LoginPage.ss
Using SS 2.4.1

Avatar
Willr

30 August 2010 at 9:35pm Forum Moderator, 5511 Posts

The default login / logout screens are part of the Security controller so you can make a Security.ss file to override the Page.ss styles.

Avatar
subpixel

30 August 2010 at 9:52pm Community Member, 4 Posts

Thanks, it's good to know.
However is it possible to detect it via any property. I'm looking for something like

<% if Security %><% include .. %>

Avatar
zenmonkey

9 October 2010 at 3:03am Community Member, 528 Posts

Security pages have an ID=0 which i think I've used as a hacky way of manipulating their templates in the past

Avatar
Willr

9 October 2010 at 10:37am Forum Moderator, 5511 Posts

You can also use classname = <% if ClassName = Security %>