Announcement

Collapse
No announcement yet.

Banner help - this feels like it should be really easy..

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Banner help - this feels like it should be really easy..

    ..but I'm loosing the battle.

    I'm into my 3rd day with Actinic (so apologies if I'm being thick).

    My current problem..
    I'm working on a deperatment store, each department is a section.

    I would like a different banner to show dependant on which section you are viewing.

    I couldn't really find anything so I placed this inside the 'banner div' (I'm using my own site design rather than a template):
    Code:
    <img alt="<actinic:variable name="SectionName" encoding="strip"/>" src="<actinic:variable Name="SectionImageFileName"/>" border="0" />
    Now this sort of works, it displays a different image when you visit a new section. Exactly what I wanted. That's the good news..

    ..The bad news is:
    a: this method gives me 52 coding errors .. (the 'code won't work there' error)
    b: I also have about 4 'pages' within the site and of course nothing displays in the banner area when visiting a page rather than a section.

    So my question is: how do I get a different banner to display for each section and how do I get a different, generic or random(anything really) banner to display when visiting a page. All without causing any coding errors.

    Thanks for any help you can give.

    PS - I'm using V9

    #2
    The PageType variable will help here. It contains "Section" for Section Pages and something else on other pages.

    So you will need two blockIf's (pseudo code below) - see Starter Guide for help on proper code.

    1) if (PageType == "Section") use Section Image

    2) if (PageType != "Section") use a default image
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      thankyou

      ..that's brilliant, it works, thankyou.

      This is the code I ended up with and it seems to work with no errors.

      Code:
      <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22" >
      <img src ="<actinic:variable name="SectionImageFileName" />" border="0" />
      </actinic:block>
      <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%22Section%22" >
      	<img src="defaultbanner_Image.jpg"/>
      </actinic:block>

      Comment

      Working...
      X