Jump to:

3445 Posts in 1031 Topics by 872 members

Template Questions

SilverStripe Forums » Template Questions » A page head for each section

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

Page: 1 2 3
Go to End
Author Topic: 6698 Views
  • Jeramie
    Avatar
    Community Member
    34 Posts

    Re: A page head for each section Link to this post

    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?

  • steve_nyhof
    Avatar
    Community Member
    224 Posts

    Re: A page head for each section Link to this post

    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 %>

  • Jeramie
    Avatar
    Community Member
    34 Posts

    Re: A page head for each section Link to this post

    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.

  • HanSolo
    Avatar
    Community Member
    83 Posts

    Re: A page head for each section Link to this post

    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

  • HanSolo
    Avatar
    Community Member
    83 Posts

    Re: A page head for each section Link to this post

    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

  • Monty
    Avatar
    Community Member
    19 Posts

    Re: A page head for each section Link to this post

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

  • Bastir
    Avatar
    Community Member
    8 Posts

    Re: A page head for each section Link to this post

    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

  • Rachel
    Avatar
    Community Member
    3 Posts

    Re: A page head for each section Link to this post

    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

    6698 Views
Page: 1 2 3
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.