Announcement

Collapse
No announcement yet.

Variable Combination?

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

    Variable Combination?

    Is it possible to somehow join two variables? I want to assign a url to a section name and product. Normally, this would look something like:
    Product_Sections_Whats_New_100.html#art567.
    I have tried this with the following:
    <a href="<actinic:variable name="SectionURL" />#a<actinic:variable name="ProductReference" />">CLICK HERE to return to the Product List</a>
    but it doesn't work! Firefox doesn't know what to do with it!
    Does anyone know how I can achieve the link to the specific product using variables? Is there some special code needed to join them?

    #2
    Don't use

    #a<actinic:variable name="ProductReference" />

    Use:

    #<actinic:variable name="EncodedProductAnchor" />

    Because Actinic encodes special characters in the product reference when building the page anchor and thus uses EncodedProductAnchor as the product anchor.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Just tried this and getting the same "don't know what to do with this..." from Firefox. Is it possible that this doesn't work in Preview? Also I notice in the source code that the "a" following the "#" is included in the EncodedProductAnchor variable, so only the "#" is required. So my code is like this:
      <a href="<actinic:variable name="SectionURL" />#<actinic:variable name="EncodedProductAnchor" />">CLICK HERE to return to the Product List</a>

      Comment


        #4
        It won't work in preview as Firefox doesn't like the file reference to your hard drive in a link.

        Comment


          #5
          OK. I will upload and see what gives. Thank you.

          Comment


            #6
            Uploaded this code:
            <a href="<actinic:variable name="SectionURL" />#<actinic:variable name="EncodedProductAnchor" />">CLICK HERE to return to the Product List</a>
            but it still doesn't work.
            It appears to create a url like this:
            ...Product_Sections_Sparklers_6.html&NOLOGIN=1#an280
            Don't know what the NOLOGIN bit is about but it doesn't allow the link to the product to work. Not sure where to go from here...

            Comment


              #7
              Did you try Norman's post above.

              Comment


                #8
                Originally posted by marknc View Post
                Uploaded this code:
                <a href="<actinic:variable name="SectionURL" />#<actinic:variable name="EncodedProductAnchor" />">CLICK HERE to return to the Product List</a>
                but it still doesn't work.
                It appears to create a url like this:
                ...Product_Sections_Sparklers_6.html&NOLOGIN=1#an280
                Don't know what the NOLOGIN bit is about but it doesn't allow the link to the product to work. Not sure where to go from here...
                Yes I did. As above.

                The link created by these variables is:
                http://mysiteurl/cgi-bin/ss000001.pl...OLOGIN=1#an280
                I think the NOLOGIN bit is appended because the link is going via the cgi-bin and I'm not sure of any way around it. I keep experimenting but it's all guess work really.

                Comment


                  #9
                  That link format will work - are you looking to create a link that doesn't go via the cgi-bin?
                  If so then use this:

                  <a href="<actinic:variable name="SectionPageName" />#a<actinic:variable name="ProductReference" />">CLICK HERE to return to the Product List</a>

                  Comment


                    #10
                    Absolutely brilliant. That works, thank you drounding. I learned something today. I'm so grateful for the solution. All the best.
                    Mark

                    Comment


                      #11
                      Using

                      #a<actinic:variable name="ProductReference" />

                      will only work if your product references are purely alphanumeric. If there are any other characters used this will fail. Much better to use

                      #<actinic:variable name="EncodedProductAnchor" />

                      as mentioned before.
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment


                        #12
                        Point noted Norman. All of our references are indeed alpha/numerical. I am just working on how to make a direct link to a product work with duplicate products. My guess is that the duplicates would have to have their own unique reference number.

                        Comment

                        Working...
                        X