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>
- I was getting the expected output before the page is republished.
- 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.