Hi!
I'm trying to use the PageExtension CustomPageLink which, according to the SDK, is a Page option that makes it possible to load a page with a different template than the standard template for the page type.
I have my base class which inherits from EPiServer.TemplatePage:
public class GMapTemplate : EPiServer.TemplatePage
{
public GMapTemplate() : base(1, CustomPageLink.OptionFlag)
{
}
}
I then try to reach my .aspx which inherits from GMapTemplate by adding ?custompageid=27 to the Url. (As specified in the SDK: "This is done by setting the query string "custompageid" to the page id that you want to load".)
This does not work as intended, the CurrentPage objects point to the StartPage (which is not page with id 27).
Ideas would be greatly appreciated.
Hi,
You need setup optionflag on first parameter in constructor:
public GMapTemplate() : base( CustomPageLink.OptionFlag,0 )
I hope this will solve your problem
public class GMapTemplate : EPiServer.TemplatePage { public GMapTemplate() : base(1, CustomPageLink.OptionFlag) { } }
I then try to reach my .aspx which inherits from GMapTemplate by adding ?custompageid=27 to the Url. (As specified in the SDK: "This is done by setting the query string "custompageid" to the page id that you want to load".) This does not work as intended, the CurrentPage objects point to the StartPage (which is not page with id 27). Ideas would be greatly appreciated.