I have belowtried the following code in thea DWT and the internal link (tridion:href="@@Links0href= "@@Links0.Fields.link@@")
does not get resolved.
<a onclick="_gaq.push(['_trackEvent', '@@Links0.Metadata.ga_category@@',
'@@Links0.Metadata.ga_action@@', '@@RenderComponentPresentation
(Links0.ID,RemoveSpecialCharactersFromTitle)@@']);"
tridion:href="@@Links0.Fields.link@@" target="_blank" class="button primary" >
When iI place this internal link attribute(tridion:href="@@Links0.Fields.link@@") before the onclick , the link get resolved successfully. But page get failedfails at the time of deployment and throw belowwith the following error -:
So as iI found that there is some issue with @@RenderComponentPresentation(Links0.ID,RemoveSpecialCharactersFromTitle)@@@@RenderComponentPresentation(Links0.ID,RemoveSpecialCharactersFromTitle)@@
passed as the parameter in the google analyticsGoogle Analytics.
There wereare some project limitationproject limitations, so we are rendering the ComponentPresentationComponent Presentation inside the google analyticsGoogle Analytics in above mentionedthe way mentioned above. When i
When I place the text returnreturned by this componentComponent Presentation, for example, "This is a sample product" it works correctly.
means in blow caseBy this I mean the following internal link get resolved successfully.:
<a onclick="_gaq.push(['_trackEvent', '@@Links0.Metadata.ga_category@@',
'@@Links0.Metadata.ga_action@@', 'This is sample product']);"
tridion:href="@@Links0.Fields.link@@" target="_blank" class="button primary" >
iI tried to set the output of this component presentationComponent Presentation in the RenderContextVariableRenderContextVariable
@@SetRenderContextVariable("linkTitle_withoutSC",
RenderComponentPresentation(Links0.ID,RemoveSpecialCharactersFromTitle))@@
andAnd also tried then belowthe following way -:
<a onclick="_gaq.push(['_trackEvent', '@@Links0.Metadata.ga_category@@',
'@@Links0.Metadata.ga_action@@', '@@RenderContextVariable.linkTitle_withoutSC@@']);"
tridion:href="@@Links0.Fields.link@@" target="_blank" class="button primary" >
But this workaround is not working since we can not set and use RenderContextVariable in thethe same DWT,DWT. Please validatelet me hereknow if iI am wrong here.
Now i amI have been unable to find anyotherany other way to deal with the internal link in this casemy situation.
Could somebody help me on this.?
Point 1- Reason to use @@RenderComponentPresentation(Links0.ID,RemoveSpecialCharactersFromTitle)@@@@RenderComponentPresentation(Links0.ID,RemoveSpecialCharactersFromTitle)@@
inside the Google Analytics
Component for this presentation is nested linked component so iI can perform my task though a C# TBB or fragment having logic same to "RemoveSpecialCharactersFromTitle"RemoveSpecialCharactersFromTitle
so I use RenderComponentPresentationRenderComponentPresentation
here.
Point 2- I am trying to set and use RenderContextVariableRenderContextVariable
in the same DWT of a CT sothatso that it return me the string ouput[Title]output[Title] .By this way iI can avoid the conflict of "tcdl:ComponentPresentation"tcdl:ComponentPresentation
and "tcdl:Link"tcdl:Link
tags during the deployment phase.