Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Document Type Transformations for main page and sub page View modes: 
User avatar
Member
Member
brian-cardlabcorp - 4/2/2011 12:01:50 PM
   
Document Type Transformations for main page and sub page
I've followed the tutorial for creating a new document type of computer and I was able to see the list of computers and when I click on the computer I can now see the details of the computer. All of that works fine. so I have the following:

--Product
------Computer 1
------Computer 2

Now I want to put a message board and content rating on each 'computer' page. Is there a way of doing this without the message board and rating showing up on the 'Products' page? I'm assuming I could go in and create a new template and place those controls on the template? If I have 100 computers I would not want to have to go in and modify each page manually. Is there a way to do this and have it apply to all of these pages?

Here is the tutorial:

http://devnet.kentico.com/docs/tutorial/index.html

Thanks for your help,
Brian
I've created a new document type. I then went

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 4/12/2011 3:10:21 AM
   
RE:Document Type Transformations for main page and sub page
Hi,

Building upon example from the tutorial, you can either add the message board to the Selected item transformation of the product Datalist, or add it as a standalone webpart into the products page template (layout).

It is possible to place your Message board webpart to the transformation like this:

...
<%@ Register Src="~/CMSWebParts/MessageBoards/MessageBoard.ascx" TagName="MessageBoard" TagPrefix="cms" %>
...

<cms:MessageBoard ID="msgBoard" runat="server" BoardOpened="true"
MessageTransformation="Community.Transformations.MessageBoard" ShowEdit="true"
ShowDelete="true" ShowApprove="true" ShowReject="true"
BoardUseCaptcha="true" EnableContentRating="true" EnableAnonymousRead="true" />

You may need to use appropriate (and existing) transformation in MessageTransformation attribute, this is just an example.

The second approach would be placing the Message board webpart directly into the page template, under the product Datalist. In the webpart properties, you would set "Show for document types" to your "computer" doctype, so that it would show only in detail page (selected item)...not in all products list. You can specify all product document types you're listing (or those you want to offer the message board).

Regards,
Zdenek