According to bug# 2922 (Application 19.0.0.1) the problem with If Defined tags having no effect on custom tags from the Page Template Extender, should be fixed
But on application 19.0.0.3 this still don’t work.
In my page template I have placed the following code
CIT:Test:1=<!--@CIT:Test:1--><BR>
<!--@If Defined(CIT:Test:1)-->
It works from Page template extender!<br>
<!--@EndIf(CIT:Test:1)-->
<!--@If Not Defined(CIT:Test:1)-->
It DON'T work from Page template extender!<br>
<!--@EndIf(CIT:Test:1)-->
<br>
Global:Extranet.UserName=<!--@Global:Extranet.UserName--><BR>
<!--@If Defined(Global:Extranet.UserName)-->
It works from standard<br>
<!--@EndIf(Global:Extranet.UserName)-->
And in my Page template extender i set the custom tag as followed
public class PageTemplateExtender : Dynamicweb.PageTemplateExtender
{
public override void RenderTemplate(Dynamicweb.Templatev2.Template parmTemplate)
{
parmTemplate.SetTag("CIT:Test:1", "#");
}
}
This generate the following output:
CIT:Test:1=#
It DON'T work from Page template extender!
Global:Extranet.UserName=k1
It works from standard