1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Content View control

Content View control

7 posts, 0 answered
  1. Darshani
    Darshani avatar
    18 posts
    Registered:
    13 Oct 2009
    23 Oct 2009
    Link to this post
    Hi,

    I have a client requirement to use Generic Content control to hold static page information.

    1. Once the content is added, I can see the links "Full Story, Comments(0), Posted by" appearing on the page even though I have made the Comments to FALSE in properties.Can anyone tell me how to disable the links Full Story, Comments(0), Posted by?

    2. Also the content topic takes the user into a detailed page which I dont want to have. Is there anyway to avoid the topic being linked to a detailed page and show the whole content within the first page itself?

    Look forward a speedy response.

    Regards,
    Darshani
    www.eyepax.com

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    23 Oct 2009
    Link to this post
    Hi Darshani,

    1. Once the content is added, I can see the links "Full Story, Comments(0), Posted by" appearing on the page even though I have made the Comments to FALSE in properties.Can anyone tell me how to disable the links Full Story, Comments(0), Posted by?

    You can map ContentViewItemList template and remove the Comments link and  posted by html text

    <div class="sf_contentComments">
                 <asp:HyperLink ID="CommentsLink" runat="server" NavigateUrl="{0}#comments">
                     <asp:Label ID="CommentsCount" runat="server"></asp:Label>
                     <asp:Literal Text="<%$Resources:Comments %>" runat="server"></asp:Literal>
                 </asp:HyperLink>
             </div>
             <div class="sf_contentAuthor">
                 posted by:
                 <asp:HyperLink ID="postedBy" runat="server">
                     <asp:Literal ID="Author" runat="server"></asp:Literal>
                 </asp:HyperLink>
             </div>

    2. Also the content topic takes the user into a detailed page which I dont want to have. Is there anyway to avoid the topic being linked to a detailed page and show the whole content within the first page itself?


    Set Presentation mode to auto and the control will load the whole content. You can disable the FullStory link as described in 1.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Darshani
    Darshani avatar
    18 posts
    Registered:
    13 Oct 2009
    23 Oct 2009
    Link to this post
    Hi Ivan,

    Thanks, but I am afraid. In the ContentViewItemList template we are unable to find a piece of code matching to what you have highlighted above. Can you please help me? may be a line number or a component name?

    Thanks a lot,
    Darshani
    www.eyepax.com



  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    23 Oct 2009
    Link to this post
    Hello Darshani,

    Here is the template declaration, please compare it with yours.

    <%@ Control Language="C#" %>
    <%@ Register Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" TagPrefix="sf" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Cms.Engine.WebControls" Assembly="Telerik.Cms.Engine" %>
    <%@ Register Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" TagPrefix="sfWeb" %>
     
    <sfWeb:CssFileLink ID="CssFileLink1" EmbeddedFileName="Telerik.Cms.Engine.Resources.ControlTemplates.Frontend.genericContentCommonLayout.css" FileName="" Media="screen" runat="server" />
     
    <asp:Repeater ID="repeater" runat="server">
     <HeaderTemplate>
            <ul class="sf_genericContentList">
        </HeaderTemplate>
        <ItemTemplate>
            <li>
                <h2 class="sf_contentTitle">
                    <asp:HyperLink ID="fullContent1" runat="server">
                        <asp:Literal ID="Name" runat="server"></asp:Literal>
                    </asp:HyperLink>
                </h2>
                <p class="sf_contentDate">
                    <sf:DateTimeLiteral runat="server" ID="Publication_Date" DateFormatString="D"></sf:DateTimeLiteral>
                </p>
                <asp:Panel id="pnlPostContent" runat="server" CssClass="sf_genericContent">
                     
                        <asp:Literal ID="content" runat="server"></asp:Literal>
                     
                </asp:Panel>
                <p class="sf_readMore">
                    <asp:HyperLink ID="fullContent2" runat="server">
                        <asp:Literal ID="Literal1" runat="server" Text="<%$Resources:FullStory %>"></asp:Literal>
                    </asp:HyperLink>
                </p>
                <div class="sf_contentComments">
                    <asp:HyperLink ID="CommentsLink" runat="server" NavigateUrl="{0}#comments">
                        <asp:Label ID="CommentsCount" runat="server"></asp:Label>
                        <asp:Literal Text="<%$Resources:Comments %>" runat="server"></asp:Literal>
                    </asp:HyperLink>
                </div>
                <div class="sf_contentAuthor">
                    posted by:
                    <asp:HyperLink ID="postedBy" runat="server">
                        <asp:Literal ID="Author" runat="server"></asp:Literal>
                    </asp:HyperLink>
                </div>
            </li>
        </ItemTemplate>
        <FooterTemplate>
            </ul>
        </FooterTemplate>
    </asp:Repeater>
    <sfWeb:Pager ID="pager1" runat="server">
        <LayoutTemplate>
             <asp:Repeater ID="PageRepeaterLinkButton" runat="server">
                <HeaderTemplate>
                    <ol class="sf_pager">
                    <li><asp:LinkButton ID="PreviousPage" runat="server" Text="<%$Resources:PreviousPage %>"></asp:LinkButton></li>
                </HeaderTemplate>
                <ItemTemplate>
                    <li>
                        <asp:LinkButton ID="SingleItem" runat="server" />
                    </li>
                </ItemTemplate>
                <FooterTemplate>
                    <li><asp:LinkButton ID="NextPage" runat="server" Text="<%$Resources:NextPage %>"></asp:LinkButton></li>
                    </ol>
                </FooterTemplate>
            </asp:Repeater>
            <asp:Repeater ID="PageRepeaterHyperLink" runat="server">
                <HeaderTemplate>
                    <ol class="sf_pager">
                    <li><asp:HyperLink ID="PreviousPage" runat="server" Text="<%$Resources:PreviousPage %>"></asp:HyperLink></li>
                </HeaderTemplate>
                <ItemTemplate>
                    <li>
                        <asp:HyperLink ID="SingleItem" runat="server" />
                    </li>
                </ItemTemplate>
                <FooterTemplate>
                    <li><asp:HyperLink ID="NextPage" runat="server" Text="<%$Resources:NextPage %>"></asp:HyperLink></li>
                    </ol>
                </FooterTemplate>
            </asp:Repeater>
        </LayoutTemplate>
    </sfWeb:Pager>


    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Darshani
    Darshani avatar
    18 posts
    Registered:
    13 Oct 2009
    23 Oct 2009
    Link to this post
    Ivan,

    It is quite strange that the file we have in our installation does not contain any code similar to what you have highlighted in red color. However we see those links in the content page.

    I have copied it below, can you tell what has gone wrong there?
    ---------------------------------------------------------------------
    <%@ Register Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" TagPrefix="sf" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Cms.Engine.WebControls" Assembly="Telerik.Cms.Engine" %>

    <asp:HyperLink ID="backLink" runat="server" Text="<%$Resources:GoBack %>" />
    <asp:Repeater ID="repeater" runat="server">
        <HeaderTemplate>
            <table style="height:400px;width:100%;">
                <thead>
                    <tr>
                        <th>
                            <asp:Literal ID="Literal1" runat="server" Text="<%$Resources:Author%>" />
                         </th>
                        <th>
                            <asp:Literal ID="Literal2" runat="server" Text="<%$Resources:Title%>" />
                        </th>
                        <th>
                            <asp:Literal ID="Literal3" runat="server" Text="<%$Resources:PubDate%>" />
                       </th>
                    </tr>
                </thead>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td style="white-space:nowrap; padding: 5px; width: 15%;">
                    <asp:Label ID="author" runat="server"></asp:Label></td>
                <td style="padding: 5px; width: 75%;">
                    <asp:HyperLink ID="fullContent1" runat="server">
                        <asp:Label ID="Title" runat="server"></asp:Label>
                    </asp:HyperLink>
                </td>
                <td style="white-space:nowrap; width: 10%;">
                    <asp:Label ID="pubDate" runat="server"></asp:Label>
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>
    <sf:Pager ID="pager1" runat="server">
        <LayoutTemplate>
             <asp:Repeater ID="PageRepeaterLinkButton" runat="server">
                <HeaderTemplate>
                    <ol class="sf_pager">
                    <li><asp:LinkButton ID="PreviousPage" runat="server" Text="<%$Resources:PreviousPage %>"></asp:LinkButton></li>
                </HeaderTemplate>
                <ItemTemplate>
                    <li>
                        <asp:LinkButton ID="SingleItem" runat="server" />
                    </li>
                </ItemTemplate>
                <FooterTemplate>
                    <li><asp:LinkButton ID="NextPage" runat="server" Text="<%$Resources:NextPage %>"></asp:LinkButton></li>
                    </ol>
                </FooterTemplate>
            </asp:Repeater>
            <asp:Repeater ID="PageRepeaterHyperLink" runat="server">
                <HeaderTemplate>
                    <ol class="sf_pager">
                    <li><asp:HyperLink ID="PreviousPage" runat="server" Text="<%$Resources:PreviousPage %>"></asp:HyperLink></li>
                </HeaderTemplate>
                <ItemTemplate>
                    <li>
                        <asp:HyperLink ID="SingleItem" runat="server" />
                    </li>
                </ItemTemplate>
                <FooterTemplate>
                    <li><asp:HyperLink ID="NextPage" runat="server" Text="<%$Resources:NextPage %>"></asp:HyperLink></li>
                    </ol>
                </FooterTemplate>
            </asp:Repeater>
           
        </LayoutTemplate>
    </sf:Pager>

    ------------------------------------------------------------------
    Many thanks,
    Darshani
    www.eyepax.com
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    23 Oct 2009
    Link to this post
    Hi Darshani,

    As I see it you are using not the correct template. The template you have pasted is for Sitefinity\ControlTemplates\FeedAggregator\ContentViewItemList.ascx.

    Just to let you know RadEditor controls supports Format Code Block that can be used when you paste any code.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Darshani
    Darshani avatar
    18 posts
    Registered:
    13 Oct 2009
    29 Oct 2009
    Link to this post
    Hi Ivan,

    Thanks, I found the correct template and it worked well.

    Thanks again for the help.

    Darshani
    www.eyepax.com
Register for webinar
7 posts, 0 answered