Announcement

Collapse
No announcement yet.

Help with Condition Editor

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

    Help with Condition Editor

    Can anyone tell me why this blockif gives me coding errors or if there is a help file for the condition editor?

    Code:
    (<actinic:variable name="SectionLevel" /> == 2) or (<actinic:variable name="PageType" />  == "Search Results")
    If I use either part on its own then it works - its only when I add OR that it gives me the errors.
    Unusual Silver Jewellery
    Giftmill - Unusual Gifts
    Crystal Healing Jewellery
    Steampunk Jewellery

    #2
    This doesn't give any coding errors on a default site for me:
    Code:
    <actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionLevel%22%20%2f%3e%20%3d%3d%202%29%20or%20%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%20%3d%3d%20%22Search%20Results%22%29">
    	hello
    </actinic:block>
    In what context are you using it?

    Comment


      #3
      It is in the outer layer and I am trying to show something in the left sidebar if I am on a section level 2 page or the Search Results page.

      The coding error I get is The 'SectionLevel' variable has been placed within the 'Silver' (which is the outer layer) layout, but it won't work here.
      Unusual Silver Jewellery
      Giftmill - Unusual Gifts
      Crystal Healing Jewellery
      Steampunk Jewellery

      Comment


        #4
        It doesn't like the Section Level test on the outer layout.
        Can you not just test for the PageType?
        Are the search results related to the section level?

        Comment


          #5
          I would have come to the same conclusion if it wasn't for the fact that it works perfectly well if I don't add the PageType part after the OR.

          Basically I have a list of sections containing say -bracelets- then some filters in the sidebar so the user can select to show only certain styles of bracelets. The filters are just search links copied from the normal search results page.

          What I was trying to do was to show the filters whilst on the section pages then show a back button on the results page.
          Unusual Silver Jewellery
          Giftmill - Unusual Gifts
          Crystal Healing Jewellery
          Steampunk Jewellery

          Comment


            #6
            I never use brackets and I use OR capitalised, perhaps this is causing your problems. Failing that you should be able to put anything in the sidebars using the pagetype variable as far as I have ever found.

            It sometimes help to set up the two conditions as their own entity i find, you can merge them once you know you have both parts doing as you wish and working properly.

            Comment


              #7
              Have tried it with and without the brackets, small and capitalised OR and even tried exiting the program, compacting the database, purrging the content, standing on one leg whilst pressing the Apply button. You name it - I've tried it!

              What exactly do you mean when you say set the two conditions in their own entity then merge them?

              Duncan. I only want these filters to be shown for SectionLevel 2 as I have a TLS of Bracelets then Level 2 as 1st 12 items, 2nd 12 items etc. Level 3 are the one product per page sections.
              Unusual Silver Jewellery
              Giftmill - Unusual Gifts
              Crystal Healing Jewellery
              Steampunk Jewellery

              Comment


                #8
                Originally posted by AndyBorrett
                What exactly do you mean when you say set the two conditions in their own entity then merge them?
                You have two parts, split them and get each part working on its own first.

                Comment


                  #9
                  I must have sounded really numb - sorry Lee, its been a long day

                  Splitting the code and writing 2 seperate blocks works fine - it never occured to me.
                  Unusual Silver Jewellery
                  Giftmill - Unusual Gifts
                  Crystal Healing Jewellery
                  Steampunk Jewellery

                  Comment


                    #10
                    Further problems with Section level variables

                    I too have encountered similar problems, with section level variables in the left navigation bar and breadcrumb trail that are perfectly valid and work fine, but generate coding errors.
                    Is there not a system-wide flag anywhere that can be set which simply suppresses all coding error warnings? They ideally need to be turned for initial testing, and turned off once the code is proven.
                    Andy Shercliff
                    www.4children2enjoy.co.uk

                    Comment


                      #11
                      I have too but once wrapped in a pagetype check so it only processes on the required pages, it seems fine to me.

                      Comment


                        #12
                        Yes, thanks, that has now worked for me too. As I now understand it, the objective is to hide all code containing section variables from the code checking process, for page types such as "Brochure", "Site Map", "Search" and "Search Results".
                        Andy Shercliff
                        www.4children2enjoy.co.uk

                        Comment


                          #13
                          That's the idea Andy, at least how i look at it also. If you are not on anything 'section' related then don't run any section related content etc. Basic aim is to try and filter out right at the top, the type of page we are on and therefore what we want to do on it. This usually suppresses all warnings then. If you specify to only run on section pages, then it excludes all other pages, this is quicker than telling it the pages not to run on.

                          Comment

                          Working...
                          X