Announcement

Collapse
No announcement yet.

Section Name in Fragment Layout

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

    Section Name in Fragment Layout

    Each section of this site has a fragment at the top describing the products that follow and the myriad of different products are displayed as a list.

    Tthe fragment images are all larger than the constraints imposed by the layout so I have the unconstrained image opening in a Fancybox when the fragment image is clicked:
    Code:
    <a class="fancybox" href="<actinic:variable name="FragmentImageFileName" />" title="<actinic:variable encoding="actinic" name="SectionName" />"> 
    <img src="<actinic:variable name="FragmentImageFileName" />"
       title="<actinic:variable name="FragmentTitle" encoding="strip" />"
       alt="<actinic:variable name="FragmentTitle" encoding="strip" />"
       border="0"
       width="<actinic:variable name="FragmentImageWidth" />"
       height="<actinic:variable name="FragmentImageHeight" />"
       />
    
       </a>
    It works and fancybox displays the section name on the enlarged image. Problem is that it throws up a big red error which clients tend not to like.

    How can I place the section name in a fragment without generating an error?

    Thank you very much.
    Last edited by graphicz; 25-Jun-2015, 09:25 AM. Reason: Typo
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    Try wrapping it in a blockif with pagetype == 'section'
    Peblaco

    Comment


      #3
      doh! I always miss the obvious!

      Thanks Louise
      Jonathan Chappell
      Website Designer
      SellerDeck Website Designer
      Actinic to SellerDeck upgrades
      Graphicz Limited - www.graphicz.co.uk

      Comment


        #4
        Code:
        <a class="fancybox" href="<actinic:variable name="FragmentImageFileName" />" title="<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Section%27"><actinic:variable encoding="actinic" name="SectionName" /></actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Brochure%27"><actinic:variable name="FragmentTitle" /></actinic:block>">
        Jonathan Chappell
        Website Designer
        SellerDeck Website Designer
        Actinic to SellerDeck upgrades
        Graphicz Limited - www.graphicz.co.uk

        Comment

        Working...
        X