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   1638 Views

Avatar
subpixel

Community Member, 4 Posts

30 August 2010 at 8:11pm

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

Forum Moderator, 5513 Posts

30 August 2010 at 9:35pm

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

Community Member, 4 Posts

30 August 2010 at 9:52pm

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

Community Member, 532 Posts

9 October 2010 at 3:03am

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

Forum Moderator, 5513 Posts

9 October 2010 at 10:37am

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