Announcement

Collapse
No announcement yet.

section name within description (variable)

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

    section name within description (variable)

    Hi, im desperately trying to include the section name within the section description using a variable, iv tried this <actinic:variable name="SectionPageName" /> with no luck. any suggestions?

    Much appreciated.

    #2
    Copy paste it from the design tab to the field where you want it, you'll see the format then, needs to be in square brackets if within a normal field that you fill out.

    Comment


      #3
      hi lee, thanks for that so it gives me <actinic:variable name="SectionPageName" />

      i change it to [SectionPageName] and still get nothing. any suggestions. on my priduct details i use [productname] and that works so i dont understand?

      Comment


        #4
        It's SectionName for the name of the section. SectionPageName is for the filename of the page.

        Being able to use [VariableName] is an undocumented Actinic quirk and the variables mentioned don't seem to work in this way in the Section Description. They do in the Product Description.

        You'd need some PHP to load the description and section name into two variables and to a str_replace to emulate this accidental functionality. Then echo out the replaced string. Note that [SectionName] will look like &#38;#91;SectionName&#38;#93; within the PHP so you need to search for that.

        Something like replacing <actinic:variable name='SectionDescription'/> in your Section Link Layout with.
        Code:
        <actinic:block php="true">
        	$sectdesc = '<actinic:variable name='SectionDescription' selectable="false" />';
        	$sectname = '<actinic:variable name='SectionName' encoding='perl' selectable='false' />';
        	echo str_replace('&#38;#91;SectionName&#38;#93;', $sectname, $sectdesc);
        </actinic:block>
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Thanks so I'd need some php, I'm no pro at php would you be able to give me some more pointers at this?

          Comment


            #6
            Amended my post above to show you how.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Best revisit my post #4 as I've changed it for a more elegant solution.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment

              Working...
              X