Announcement

Collapse
No announcement yet.

Hiding section name only on certain pages?

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

    Hiding section name only on certain pages?

    We've just got a new design for our site and we want to be able to display the section name on all pages except for two, where we will be using large promotional banners with the section names already on them.

    I'm not sure if this is a case of replacing the SectionName variable with something else or setting up a custom block or something really simple that I'm just not getting. I've looked around the forums and haven't been able to find an answer to this, so if anyone can point me in the right direction I'd be really greatful.

    Thanks.

    #2
    You can place a block around the SectionName variable in the layout and test for the value of the SectionName that you want.

    Have a play around you will find blocks very powerful and quite easy to get to grips with.

    Comment


      #3
      Thank you. I have no idea how to code in the block instructions but I'll have a play about and see if I can get it working now that I know where I should be looking.
      Much appreciated

      Comment


        #4
        Ok figured it out (yay) but its messed up my page layout somehow (boo). Ignoring that for a moment, is there anyway to see which sections have which IDs or is it just case of guessing?

        Comment


          #5
          There's a variable called sectionID, add it to the section layout to see the IDs and then when you've finished with it, remove it.

          Comment


            #6
            Too bad you cant just view them like product IDs alongside themselves in the content tree, something to add into the next version then I guess.

            I guess I'll post how I did it incase anyone else needs help, but I'm not sure how helpfull I'll be

            Somewhere in the INNERLAYOUT you have the variable SectionName. (We have two in our version but I think that's probably unusual.) I found ours alongside the section image and description as below:

            <div class="second_level" style="background-image: url(<actinic:variable name="SectionImageFileName" />);">
            <p class="second_level_title"><actinic:variable name="SectionName" /></p>
            <p class="second_level_text"><actinic:variable name="SectionDescription" /></p></div>


            you just want to create a block around the section name tag itself like below (type in block if and actinic will add the tag, then just move the /block tag to the right place):

            <div class="second_level" style="background-image: url(<actinic:variable name="SectionImageFileName" />);">
            <p class="second_level_title"><actinic:block if="%28%3cactinic%3avariable%20name%3d%22SectionID%22%20%2f%3e%20%21%3d%201%29" ><actinic:variable name="SectionName" /></actinic:block></p>
            <p class="second_level_text"><actinic:variable name="SectionDescription" /></p></div>

            double click on the block tag to bring up the condition editor put the following in there:

            (<actinic:variable name="SectionID" /> != 1)

            change the 1 to whatever section id you want, and your done.

            If you want to hide multiple section names, then in the condition editor after the above code right click and insert operator 'and' then copy and paste in (<actinic:variable name="SectionID" /> != 1) again but change the id to the correct one.

            Comment

            Working...
            X