1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Header-Image different for each Forum-Node

Discussion in 'Styling and Customization Questions' started by erich37, Jul 4, 2015.

  1. erich37

    erich37 Well-Known Member

    I would like to create a "Header-image" (photo) very similar as show here:

    Have You Seen ... ? | Express Plus Company


    But I would like to have a different image for each different "Forum Category" (a different photo for each Forum-Node).



    Does anyone know of how to do this ?


    Many thanks!


    :)
     
  2. asusforo

    asusforo Member

    I have the same question. Is there any way to do this?
     
  3. Kintaro

    Kintaro Well-Known Member

  4. Tracy Perry

    Tracy Perry Well-Known Member

    Could you not use template conditionals
    Code:
    <xen:if is="{$forum.node_id} == 1">
    <img src="images/node_1.jpg" alt="{$xenOptions.boardTitle}" />
    <xen:elseif is="{$forum.node_id} == 2" />
    <img src="images/node_2.jpg" alt="{$xenOptions.boardTitle}" />
    <xen:elseif is="{$forum.node_id} == 3" />
    <img src="images/node_3.jpg" alt="{$xenOptions.boardTitle}" />
    <xen:else />
    <img src="@headerLogoPath" alt="{$xenOptions.boardTitle}" />
    </xen:if>
    in the logo_block template, replacing the normal
    Code:
    <img src="@headerLogoPath" alt="{$xenOptions.boardTitle}" />
    with a custom img src directing to the image(s) you want to use?

    I haven't tried it, but it should be do-able. I'm not sure about the
    Code:
    <xen:hook name="header_logo">
    segment, if that pulls the logo name or not.
     
  5. asusforo

    asusforo Member

    Thanks for the reply. Your code is working fine, but its for the logo image. My header has

    Code:
    <div id="headerProxy"></div>
    is there a way to change you if condition code for this header?
     
  6. Tracy Perry

    Tracy Perry Well-Known Member

    Should be able to with something similar... I'll have a look at it as soon as I get back from supper (wife is at the garage door yelling at me she's ready to go eat).
    I really didn't notice it was for a header image and not the logo.

    EDIT:
    It looks like (and yes, she's still yelling) that you can do similar but just assign a background image via HTML code and the same img src process in the header template. Will look more when I get back.
     
    Last edited: Nov 7, 2016
    asusforo likes this.
  7. asusforo

    asusforo Member

    Tracey thnx again for your reply.

    Yes its for the large header image. I hope you have time to check it & Good luck @Home haha
     

Share This Page