Announcement

Collapse
No announcement yet.

Variable for (html) Page Name

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

    Variable for (html) Page Name

    This is a simple question isn't it?! I just need to extract from each page on my website the page name - so "yellowtrousers.html" or "flowerdress.html". I dont want the full url "http://www.domain.com/acatalog/flowerdress.html" just the html pane name.
    I can't find the variable for it.... any ideas please?!
    Thanks.
    Chris Adams

    #2
    <actinic:variable name="SectionPageName" /> should do it, that's what I use.

    Comment


      #3
      Ahh - yes thankyou Lee.
      One thing that I find a little odd - it seems to be inserting P_ before the actual file name - so swankypants.html becomes P_swankypants.html... is there a setting somewhere I can change that is controlling this?
      Chris Adams

      Comment


        #4
        That's just the preview part, for the preview window within SD. It gets dropped online.

        Comment


          #5
          Thanks again Lee.
          A further question... when I apply this as code to a Single Product Page layout I get the product page's section parent html page name shown, not the product page. So pants.html not swankypants.html, if we can still use this silly example...!

          I also found the ProductPageName variable that you would have thought would be the one however this lists the full local directory to this page when I add it to the Product Page layout to test it like:-

          C:\ProgramData\SellerDeck v11\Site 1\SiteHTML\product-page-name.html

          as opposed to just

          product-page-name.html...

          ?
          Chris Adams

          Comment


            #6
            If you can't find a better variable then try this:
            Code:
            <actinic:block php="true">
            	echo basename('<actinic:variable name="ProductPageName" encoding="perl" selectable="false" />');
            </actinic:block>
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Thanks Norman - that does the trick nicely :-)
              Chris Adams

              Comment

              Working...
              X