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.

Template Questions /

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

A page head for each section


Go to End


24 Posts   10191 Views

Avatar
Jeramie

Community Member, 34 Posts

13 November 2009 at 7:32am

Schellmax, that's fantastic! I have been trying to figure out a way to make that happen for a week. I was happy having just the image field, but this has made my life so much better!

Does anyone know how to make sure the security/login page has an image when using this tactic?

Avatar
steve_nyhof

Community Member, 224 Posts

13 November 2009 at 7:53am

Edited: 13/11/2009 7:54am

I put this in my template. This puts in the header image I choose, else it uses a default image

<% if HeaderImage %>
<div style="padding:0 0 0 0px; margin-bottom:-4px;">
$HeaderImage
</div>
<% else %>
<div style="padding:0 0 0 0px; margin-bottom:-4px;">
<img src="assets/Headers/defaulttop.png" width="800" height="25"/>
</div>
<% end_if %>

Avatar
Jeramie

Community Member, 34 Posts

13 November 2009 at 8:16am

Excellent, thank you. That is so simple. It always seems like the answers are right there, but I am looking everywhere else.

I appreciate it steve_nyhof. Good luck with your project as well.

Avatar
HanSolo

Community Member, 87 Posts

27 November 2009 at 11:21pm

Hi I tried the following code and I am on SS 2.3.3 but I only get an error.
I checked the error log and found this

File does not exist: /public_html/themes/dreamy/css/editor.css, referer: http://www.xxxx.se/admin/

I even changed to the blackcandy template to be sure. but still an error do anyone have a clue?

I moved the editor.css from blackcandy to the dreamy css but still no luck

Joakim

Avatar
HanSolo

Community Member, 87 Posts

2 December 2009 at 10:06pm

Solved it, my problem was I did upload the file before I was logged in, now i logged in and did a dev/build and the uploaded the file and after that i did a dev/build then it worked.

Information to oher newbies.

Joakim

Avatar
Monty

Community Member, 19 Posts

13 May 2011 at 9:55am

Thanks for this. Worked a treat. Thanks for your dedicated help here on the SilverStripe Forums :)

Avatar
Bastir

Community Member, 8 Posts

21 December 2011 at 2:15am

Hi togehter:)
First the function works abolut great.
Thx for the code...

But my question? is their a possibility to integrate some transition functions (e.g jquery slider http://flex.madebymufffin.com/)? At the moment it´s a bit boring i think.

Thanks in advance for your help an idee´s

Avatar
Rachel

Community Member, 3 Posts

6 April 2013 at 2:33pm

Hi everyone. I'm also new to php code as well and I wondered how alter it to accept not only images but also swf files? Is there a simple solution to this?
Thanks

Go to Top