Good morning,
We’re trying to use a CMS: RatingControl WebPart to rating a kind of documents in a section of one of our website. We’d like to use it in a transformation, so we’re trying to follow your instructions for that: http://devnet.kentico.com/docs/devguide/index.html?displaying_ratings_in_transformations.htm
I’m going to explain you how our site is built:
This is our tree of nodes:
-Aplicaciones
------Aplicaciones oficiales
--------------AppAndroid
--------------AppIPhone
--------------AppWindows phone
------Aplicaciones Android
--------------Metro
--------------UrbanStep
--------------Moovit
------Aplicaciones Apple
--------------gobus
--------------madridBus
--------------Moovit
------Aplicaciones WindowsPhone
--------------gobus
And nodes under “Aplicaciones oficiales”, “Aplicaciones Android”, “Aplicaciones Apple” and “Aplicaciones Windows Phone” are the documents that we want to rate. This documents are a custom types of documents created by us named custom.aplicacionOpendata.
“Aplicaciones” is a Page Item that contains a repeater WebPart for listing CMS.MenuItem document types under “Aplicaciones” Node, that corresponding with “Aplicaciones oficiales”, “Aplicaciones Android”, “Aplicaciones Apple” and “Aplicaciones Windows Phone” nodes, and the transformation used is this:
<%@ Register Src="~/CMSWebParts/Babel/EMT/OpenData/aplicacionesOpendata.ascx" TagName="aplicaciones" TagPrefix="uc1" %>
<uc1:aplicaciones ID="infoGenerica" runat="server" />
And the code for AplicacionesOpendata.ascx is:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="aplicacionesOpendata.ascx.cs" Inherits="CMSWebParts_Babel_EMT_Opendata_AplicacionesOpendata" %>
<%@ Register Src="~/CMSAdminControls/ContentRating/RatingControl.ascx" TagName="RatingControl" TagPrefix="cms" %>
<div class="tab-pane" id="<%# Eval("DocumentName").ToString().Replace(" ","") %>">
<cms:CMSRepeater runat="server" ID="rptCuerpo" Path="./%" ClassNames="custom.aplicacionOpendata" TransformationName="custom.aplicacionOpendata.Default" FilterName="" MaxRelativeLevel="1" OrderBy="NodeOrder" DelayedLoading="true">
</cms:CMSRepeater>
In custom.aplicacionOpendata.Default transformation, we’re included the RatingControl as you can see below:
<%@ Register Src="~/CMSAdminControls/ContentRating/RatingControl.ascx" TagName="RatingControl" TagPrefix="cms" %>
" alt="<%# Eval("Titulo") %>">
This code aparently works fine, but all the ratingControl used show the rating for “Aplicaciones” document, and when somebody votes, the rating is saved for this document too, not for the “custom.aplicacionopendata” document that would correspond.
How can I solve this problem??
Thanks in advance,
Best regards.