Canonical Links

You could utilize this method, where you check for the existence of a variable (that you would define in the page bindings). That way, if such a variable exists, you would display the canonical link in the template. This would solve your problem where only the template you have this variable defined would show up. This would also only have you edit the templates where you want to show the canonical links and still have the code to display the link in one central place.

ie.

in the page bindings for the templates that you want to display the canonical link you put ($showCLink = true)… Then in the vm you do a check if $showCLink link = true then you display the link.

I believe that the variables that you define in the page template will roll up to the global template, but you may want to test that first :wink:

That’s great feedback and worth a try thank you. A side note, and if I understand correctly, a canonical link tag on a page tells Google, for instance, that it is the preferred page to utilize in search results and assists in alleviating dings by Google for duplicate content. One of the issues surrounding this problem of canonical links is that pages that are copied as a link in the system now have two URL paths to contend with. So, if the canonical link tag were added to a page template in one path, the page now exists in another path as well. Same page, same content, same content ID number, different URL’s. If the canonical link tag is added to the page there are now two different paths requesting to be the preferred 'canonical" page. I haven’t worked through that portion yet. I am hoping the recent submission in this thread in regard to taxonomy in version 7.2 will make this a bit easier to resolve.

Thanks again,
MJW

[QUOTE=jitendra;20707]You could utilize this method, where you check for the existence of a variable (that you would define in the page bindings). That way, if such a variable exists, you would display the canonical link in the template. This would solve your problem where only the template you have this variable defined would show up. This would also only have you edit the templates where you want to show the canonical links and still have the code to display the link in one central place.

ie.

in the page bindings for the templates that you want to display the canonical link you put ($showCLink = true)… Then in the vm you do a check if $showCLink link = true then you display the link.

I believe that the variables that you define in the page template will roll up to the global template, but you may want to test that first ;)[/QUOTE]

Why are people copying the item? I realize that the system allows it…but still… Is there a good case for it? Speaking hypothetically, how do you know which one the “main” on e is? Could you apply that method/ reasoning to figure out how when to display the canonical link? (For example, if you know that the main one is always going to be under some domain and folder, you could check to see what the link is and then only display that if it matches that particular location).

We do support copy as link in our environment although we strongly recommend against using it as it does not work well with auto indexers (among other things).

In regard to the copying as a link, not quite sure, I inherited it that way. Secondly (to your point below) I don’t know which is the ‘main’ folder. Hence the problem.
MJW

[QUOTE=jitendra;20713]Why are people copying the item? I realize that the system allows it…but still… Is there a good case for it? Speaking hypothetically, how do you know which one the “main” on e is? Could you apply that method/ reasoning to figure out how when to display the canonical link? (For example, if you know that the main one is always going to be under some domain and folder, you could check to see what the link is and then only display that if it matches that particular location).

We do support copy as link in our environment although we strongly recommend against using it as it does not work well with auto indexers (among other things).[/QUOTE]

Not to hijack the thread, but the copy as link references caught my eye, is it the rx.location.generate that is having the Folder issue with copy as link in your experiences, or is it the PSOFolderTools from the Toolkit?

Thanks,

-n

[QUOTE=mjweise;20718]In regard to the copying as a link, not quite sure, I inherited it that way. Secondly (to your point below) I don’t know which is the ‘main’ folder. Hence the problem.
MJW[/QUOTE]

@mjweise: Sorry I should have clarified. Do you have a business model that says items in the a particular folder is the “main” item? The system itself doesn’t distinguish what the “main” one is, but if there were a standard that you were following…

@natechadwick: I assume you aren’t talking about the autoindexer link problems? If so, these are the ticket numbers (TAR2206)[RX-1987]. If you are talking about the behavior of $rx.location.generate(assemblyItem) on a content item that is in multiple folders, i think it works as expected (as the link is generated to the particular item in that particular folder… the issue is that in this case, only one of them should be the “main” one…and without some other sort of indication, this would be difficult to find out)

No currently there is no “standard” per se. We are in the process of upgrading to version 7.2. In conjunction with that project is a list item to determine the policy and/or procedure in utilizing, managing etc. the copy as link functionality. That being said, I am unsure as to how I am going to determine what is what, where the ‘main’ items is located prior to that.

[QUOTE=jitendra;20720]@mjweise: Sorry I should have clarified. Do you have a business model that says items in the a particular folder is the “main” item? The system itself doesn’t distinguish what the “main” one is, but if there were a standard that you were following…

@natechadwick: I assume you aren’t talking about the autoindexer link problems? If so, these are the ticket numbers (TAR2206)[RX-1987]. If you are talking about the behavior of $rx.location.generate(assemblyItem) on a content item that is in multiple folders, i think it works as expected (as the link is generated to the particular item in that particular folder… the issue is that in this case, only one of them should be the “main” one…and without some other sort of indication, this would be difficult to find out)[/QUOTE]