Announcement

Collapse
No announcement yet.

"Block if" specific to section page with product listed?

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

    "Block if" specific to section page with product listed?

    Hi All,
    Any ideas for this:

    I am trying to hide/change elements of my outer page template if the page contains a product. If it is a brochure page or a section page with sub sections (ie without any product on it) I want the default content to stay put.

    I guess all I need is a standard actinic element which is availble on a brochure/product and section page but which would be different on each page. I tried using ProductID but I'm sure as it is only found on a product page that my statement didn't work. Any thoughts?

    I can't create another custom variable as it would get too complicated for the customer so hope there is an easy way around this,
    Cheer
    Bangers
    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
    As you have found the products are not really able to control the outer layout. Thinking on the fly how about including a modified product layout list in the outer layout and blockif test this on listindex = 0 and display the code if tru and if false insert a <!-- comment --> Probably fraught with reasons why it would not work


    Bikster
    SellerDeck Designs and Responsive Themes

    Comment


      #3
      If you have a variable set at product level, it can only act upon product pages (i'd expect), so you could have some CSS in a blockif in the head area, fired by that variable, acting out your page specific requirements. All depends what exactly you need to do, is it remove a column for example?

      Comment


        #4
        Thanks for the thoughts guys:

        Jont: That would be scary, cold sweat just thinking about it + I could see other problems beings caused by the change.

        Lee: I get it and it would be good...but I can't.
        Got stuff on the template which would effect this. + My template is a bit more complicated than I have so far explained because there is already custom variables that effect the content in question and I'm trying to come up with something which will override this variable on the product pages. However the product pages also have another custom variable that change other sitewide elements (css) on another choice selection depending on the type of product and the override need to take this into account.

        I think I will try to find another way around this.

        Cheers
        bangers
        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


          #5
          If you don't expand or show us what it actually is, we could be guessing all night. Two other thoughts spring to mind, apply a body ID and nest your styles within the body id within the CSS so they apply on the appropriate pages. The other thought is that blockifs have the 'AND' facility, so you can check 2 or more conditions and specify what to do in each circumstance.

          Comment


            #6
            Hi Lee,
            Thanks I will send if nessersary. I am trying a different method to get around it though. I have tried the AND method + one of the selectors I've menetitoned is a body ID which changes template colours and images on selection.

            So thanks for the help but I think I have come up something that will work by comprimising on some of the CSS and HTML I wanted to use sitewide.

            Cheers
            bangers
            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


              #7
              If you use PHP you may be able to do this

              Code:
              <actinic:block php="true">
                $sectionhasproducts = false;
              </actinic:block>
              <actinic:block type="ProductList">
                <actinic:block php="true">
                  $sectionhasproducts = true;
                </actinic:block>
              </actinic:block>
              <actinic:block php="true">
                if ($sectionhasproducts )
                  {
                  echo <<<ENDOFCODE
              ACTINIC VARIABLES OR LAYOUTS HERE
              ENDOFCODE;
                  }
              </actinic:block>
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Cheers Norman, I'll give it a go though I came up with a work around this could still be useful.
                Many thanks all,
                Bangers
                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

                Working...
                X