Announcement

Collapse
No announcement yet.

here's a code brain teazer - hide layout code if section or product isn't hidden

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

    here's a code brain teazer - hide layout code if section or product isn't hidden

    Hi,
    A Nice Friday evening teaser.
    I am trying to show/hide layout code on my homepage if a section and or a product inside it is not hidden from the live website.

    looked on the comunity but couldn't find anything.

    I thought of something like this (bearing in mind it is in the outer layout of the homepage:

    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsBrochureHomePage%22%20%2f%3e" >
    <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionID%22%20%2f%3e%20%3d%3d%202%29%20AND%20%3cactinic%3avariable%20name%3d%22SectionHasVisibleProduct%22%20%2f%3e" >
    <!-- layout code here -->
    </actinic:block>
    </actinic:block>
    could something like this work? i say something like this because THIS doesn't work.

    Any ideas?

    Cheers
    Lee
    Boxhedge New Media Design
    Design and development solutions for SME's.
    Tel: 0118 966 2786
    Examples of work can be found at http://www.boxhedge.com

    #2
    OK i had a further thought.
    I created a new layout and selector with the below:

    <actinic:block type="EntireSectionList" >
    <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionID%22%20%2f%3e%20%3d%3d%202%29%20AND%20%3cactinic%3avariable%20name%3d%22SectionHasVisibleProduct%22%20%2f%3e" >
    <!-- Mark-up goes in here -->
    </actinic:block>
    </actinic:block>
    This should get the section list then block if should see if section id matches my choosen section and if it has a visible product, if it does it should show the markup...but it doesn't (correction, see third post, it does!!!!!)
    Boxhedge New Media Design
    Design and development solutions for SME's.
    Tel: 0118 966 2786
    Examples of work can be found at http://www.boxhedge.com

    Comment


      #3
      Don't know what I did differently but on second attempt the second method worked with it being called into the outer layout and this blockif surronding it:

      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsBrochureHomePage%22%20%2f%3e" ><actinic:variable name="BOXHomeSpecialOffer" /></actinic:block>
      Wow, great end to the day! Now a weekend full of fun work time and a Actinic checkout area to clean up!

      Thanks to me (and anyone else who normally helps me out),
      Cheers
      lee
      Boxhedge New Media Design
      Design and development solutions for SME's.
      Tel: 0118 966 2786
      Examples of work can be found at http://www.boxhedge.com

      Comment


        #4
        Lol I enjoyed it anyway
        Reusable Snore Earplugs : Sample Earplugs - Wax Earplugs - Women's Earplugs - Children's Earplugs - Music Earplugs - Sleep Masks

        Comment

        Working...
        X