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.

We've moved the forum!

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.

Themes /

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

css not loading proparly on loginpage, and is driving me crazy


Go to End


5 Posts   2457 Views

Avatar
HanSolo

Community Member, 87 Posts

2 February 2016 at 10:41pm

I am converting a static template to a SS theme
http://www.kundregistrering.se/hem Here all css/js is loaded as it should, except the content that is not fecthed, there is mixed content, static and dynamic.
But at http://www.kundregistrering.se/Security/login?BackURL=%2Fadmin%2Fpages i get the login form but css is not loading proparly, i checked the css on the page and here the whole html is loaded.

I have tried to find an answer but it is driving me crazy!

Avatar
helenclarko

Community Member, 166 Posts

3 February 2016 at 8:36am

Hi HanSolo,

Where are you loading your CSS files?
You may find that your CSS files are loaded somewhere which doesnt cover security pages.

Have you created a template .ss file for your Security page?
You may need a template created in order for CSS to apply.
You can simply create a "Security.ss" file inside "/theme/YOURTHEME/templates/Layout".

-helenclarko

Avatar
HanSolo

Community Member, 87 Posts

3 February 2016 at 9:24am

Hi Helen
The css is in the theme folder theme/paratus/css and on http://www.kundregistrering.se/Security/login?BackURL=%2Fadmin%2Fpages if i check the code in firebug the css path is correct but when i expand the css in firebug the whole html is there but as you mentioned, i will creat a security.ss file in the layout, what should it contain? It was a while since i worked on Silverstripe.

Avatar
helenclarko

Community Member, 166 Posts

3 February 2016 at 10:31am

Hi HanSolo,

For now, just make a copy of the page.ss file within the same folder.
It may not be exactly the layout/template you want, but it should do the trick.

Just make sure $content and $form exist in the template.

-helenclarko

Avatar
HanSolo

Community Member, 87 Posts

3 February 2016 at 9:14pm

Hi Helen

I solved i forgott the base_tag ;)
So now the css loads properly ;)