admin
-
1/3/2006 1:25:32 PM
Re: CMSViewer
Hello,
Thank you for your post. You're probably using a link button, arent' you? In Kentico CMS, you usually do not need to make postbacks. Instead, you use different URLs or URL parameters to specify what (and how) should be displayed. The advantage of this way is that you can easily send a link to any (product) view to other people and they will see exactly what you saw.
Of course, postbacks are supported in Kentico CMS web sites, only in this case, this solution will not work for you as the CMSViewer control displays the content before your postback (onclick) action is run. You could use a workaround and create two CMSViewer controls with different settings and show/display each of them depending on the situation.
However, I would rather recommend another way - here's a typical solution with Kentico CMS (simplified):
If the user selects a list of products, the URL is like this: http://localhost/cms/products.aspx. The CMSRepeater (or other control) displays the list of product using the transformation specified in the TransformationName property.
If the user selects some particular product and wants to display its details, he/she is redirected to URL like this: http://localhost/cms/products/nokia6600.aspx. The CMSRepeater displays the list of products using the transformation specified in the SelectedItemTransformationName property.
If you need to create several different detailed views (such as "overview" and "technical specification"), you can create a link, such as <a href="?view=technical">See technical details</a> and then check in the Page_Load method if Request.Querystring("view") = "technical" and set the CMSViewer properties in the Page_Load method.
Should you need any additional details, please feel free to contact me at petr.palas@kentico.com.
Thank you.
Best Regards,
|