Component links in my page are redirecting to same page.

I have a page and have a component link that will redirect to other section of the same page.

I am using the following method to

componentLink.getLinkAsString(fromPage, this.componentUri.getValue(ctx), 
                                    componentTemplateUriValue, linkAttributesValue,
                                    linkTextValue, showTextOnFailValue);

The actual method call is

componentLink.getLinkAsString(tcm:58-7895-64, tcm:58-13021, 
tcm:0-0-0, title="ABCD" xmlns:tridion="http://www.tridion.com/ContentManager/5.0", click here, true);

I am geting the hyperlink as

<a href="/pathtosamepage.html" title="ABCD" xmlns:tridion="http://www.tridion.com/ContentManager/5.0">click here</a>

I am expecting as

<a href="#sectionofthepage" title="ABCD" xmlns:tridion="http://www.tridion.com/ContentManager/5.0">click here</a>
  1. I was getting the expected output before the page is republished.
  2. The source of the both versions of the page is same but behaviour is different.

There are also other pages with the links and they are working fine. I am not sure whether they will work fine after publishing.

Can some guide me how to fix this.

I am using Tridion 20011 sp1.

  • I actually found the cause for this. We are using file system to store published pages. The information on the links is stored is under /content/data/pubID/linkinfo/pages with the anme pageid.csv. The expected is "13021,-1,200,0,/pathtosamepage.html#sectionofthepage" but it is coming as "13021,22792,200,0,/pathtosamepage.html".
    – Patan
    Dec 30, 2014 at 10:20

2 Answers 2


i recently wrote a blog post on anchor topic. it talks about Out of the box and custom anchors.


If you are looking to add anchor links to generated dynamic link URLs this post gives you good examples of how to achieve that.

To my knowledge this information is never stored in the broker by default so if you previously had this information stored in the broker it must have been done using some kind of deployer extension. The only information added by the built-in webcontrols or API functions would be the ordinal position of the component presentation on the page so you would end up with something like


but never with

  • Thanks for the hint. Yeah there is a extension for the deploy. I can see that all the csv files are created under the path I mentioned above. It has got info about the links. Initially what I observed is the csv file is created properly but later it is overridden.
    – Patan
    Dec 30, 2014 at 14:08
  • I also see that "PublicationDAO is set to File System, which is not supported. Check your bindings settings and/or license file or remove PublicationDeploy module from deployer configuration." is there. IS it related to License. But the page is published successfully.
    – Patan
    Dec 30, 2014 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.