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

A page head for each section


24 Posts   6736 Views


13 November 2009 at 7:32am Community Member, 34 Posts

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?


13 November 2009 at 7:53am (Last edited: 13 November 2009 7:54am), Community Member, 224 Posts

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;">
                  <% else %>
                  <div style="padding:0 0 0 0px; margin-bottom:-4px;">
                  <img src="assets/Headers/defaulttop.png" width="800" height="25"/>
<% end_if %>


13 November 2009 at 8:16am Community Member, 34 Posts

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.


27 November 2009 at 11:21pm Community Member, 83 Posts

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:

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



2 December 2009 at 10:06pm Community Member, 83 Posts

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.



13 May 2011 at 9:55am Community Member, 19 Posts

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


21 December 2011 at 2:15am Community Member, 8 Posts

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 At the moment it´s a bit boring i think.

Thanks in advance for your help an idee´s


6 April 2013 at 2:33pm Community Member, 3 Posts

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?