Announcement

Collapse
No announcement yet.

Canonical Linking

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

    Canonical Linking

    I am trying to get this working on my duplicate pages so that the link points to the original product page. I wanted to put something like <link rel="canonical" href="http://www.supplementwarehouse.co.uk/acatalog/<actinic:variable name="SectionURL" />"/> in the head section of the page layout but instead of putting <actinic:variable name="SectionURL" /> I put the original product variable.

    Is this possible and does anyone know what the original product variable is?

    #2
    I have managed to create a variable Canonical link that will be put in the link attribute as

    <link rel="canonical" <actinic:variable name="Canonical Link" />

    Is there a way to the value of the url of the original product in the variable.

    Also is there a way of only getting the link attribute on only duplicate products without having to create a separate layout for duplicates?

    Comment


      #3
      As I am using Actinics "generate a separate product page" feature this method doesn't appear to work as the link attribute needs to go into the head tag and this is on the overall layout, not the product page.

      Anyone know where I am going wrong?

      Comment


        #4
        Try using a conditional block around your code that creates the link, i.e. variable pagetype and values of == section or == product (I think if I recall correctly).

        Thus one condition of pagetype == 'Section' and your code inside the condition for the section link.

        then, condition of pagetype == 'Product Page' and your code inside the condition for the product link.

        Code:
        	
        <actinic:block if="%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22%29" >
        	your section page link
        </actinic:block>
        <actinic:block if="%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Product%20Page%22%29" >
        	Your product page link
        </actinic:block>
        Be carefull that you dont assign product pages with section page urls as could kill your page indexing.

        Comment


          #5
          I know this might sound stupid but I can't get my <head> around what you are saying. I am a newbie with blocks.

          Comment


            #6
            I created suitable blockifs for you, so you can use those and then add in your own canonical links as required based on the page being a section or product specific page.

            You have to add this into the head for any canonical, so no change in where it should go to start with.

            Comment


              #7
              Actually just putting <link rel="canonical" href="<actinic:variable name="CanonicalLink" />" /> in the head of the overall layout seems to work perfectly. I appreciate your input.

              Just one other thing. Is there a variable for the original product url? because if there is the I am sure that <link rel="canonical" href="<actinic:variable name="CanonicalLink"/OriginalProductURL />" /> would work a treat and save having to put in the URL for each duplicate manually.

              Comment


                #8
                Surely if you apply the URL you want to the original product and allow your variable to be used by your duplicates but not amendable, then it will use the URL that you apply against the main product for all of the duplicates as well, which if you have a single product per page will then dictate to Google that each of the duplicate pages refer to the same end product page.

                All of the above (in the thread) said and done, I am not sure why you are going down the route of applying a unique value to a user defined variable, as using the pages own pagename would suffice, where you could then do some exclusion for duplicates, but without seeing the site would not know if this is going to work for you.

                Comment


                  #9
                  I have been working back to front. Having the variable on the duplicate instead of the original. As you have said it makes much more sense doing it your way. Thanks once again.

                  Comment

                  Working...
                  X