Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > CMSPages/PortalTemplate.aspx and user controls View modes: 
User avatar
Member
Member
neil-myfitfund - 7/5/2011 6:05:40 PM
   
CMSPages/PortalTemplate.aspx and user controls
This must be obvious and we are just missing something...

Is there a systematic way to avoid pages being directed to the portaltemplate.aspx page when using user controls? Is there a good rule of thumb or best practice? We keep inadvertently running into them and it's causing some challenges on pages.

Thanks! Probably super easy.

User avatar
Member
Member
kentico_michal - 7/7/2011 7:12:46 AM
   
RE:CMSPages/PortalTemplate.aspx and user controls
Hello,

To be honest, I am not completely sure If I am getting this right. Could you please describe it in more detail? What kind of issues did you encounter? The page CMSPages/PortalTemplate.aspx is a portal template used in portal engine and its code is executed for each rendered page when using portal engine approach. Thank you.

Best regards,
Michal Legen

User avatar
Member
Member
neil-myfitfund - 7/7/2011 10:50:21 AM
   
RE:CMSPages/PortalTemplate.aspx and user controls
Hi Michal,

When we create a custom control and embed it into a page using the user control web part, that custom control may have a post back. So for instance we will create a page called /usersearch.aspx

If we do process something on that control which then brings the user to the same page but with results say as in the case of a query or a search - then when the page refreshes - it comes back as /portaltemplate.aspx?alias=usersearch or something like that.

How can we maintain the old page name. Is that a control? Do you add in the cms.portal? Is that the one I'm thinking of? But we aren't doing the abstract feature.

Thanks for your help

User avatar
Member
Member
kentico_michal - 7/13/2011 2:55:36 AM
   
RE:CMSPages/PortalTemplate.aspx and user controls
Hello,

Could you please check what is the value of the following expression in the custom control when a postback takes place:

bool filter = ValidationHelper.GetBoolean(RequestStockHelper.GetItem("ApplyOutputFilter"), false);

This value indicates whether the output fitler is applied or not.

Moreover, how is the output filter set up? You can check it in Site manager -> Settings -> Output filter -> Excluded output form filter URLs.

Best regards,
Michal Legen