More in this section

Forums / General Discussions / Widget Templates - Blog

Widget Templates - Blog

10 posts, 1 answered
  1. Jaymie
    Jaymie avatar
    27 posts
    Registered:
    30 Jan 2009
    10 Feb 2011
    Link to this post
    Here is a quick one, I am sure :)

    I have created a custom Widget Template for the Blog List, it looks like this:

    <%@ Control Language="C#" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Import Namespace="Telerik.Sitefinity" %>   
     
    <telerik:RadListView ID="Repeater" ItemPlaceholderID="ItemsContainer" runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
        <LayoutTemplate>
            <sf:ContentBrowseAndEditToolbar ID="MainBrowseAndEditToolbar" runat="server" Mode="Add"></sf:ContentBrowseAndEditToolbar>
    <div class="DivContainer">
            <div class="CentreDiv">
            <ul>
                <li><a href="/Blog" class="bgLeftTop">Blog</a> </li>
                    <li class="bluebgmid"><asp:PlaceHolder ID="ItemsContainer" runat="server" /></li>
            </ul>
            </div></div>
        </LayoutTemplate>
        <ItemTemplate>
            <sf:DetailsViewHyperLink TextDataField="Title" ToolTipDataField="Description" runat="server" />
            <div class="sfpostDate">
                <sf:FieldListView ID="PostDate" runat="server" Format="{PublicationDate.ToLocal():MMM dd, yyyy}" />
            </div>  <br />  </ItemTemplate>
    </telerik:RadListView>
    <sf:Pager id="pager" runat="server"></sf:Pager>

    I have added this to my home page and set it to show 2 articles only. You can see this here:

    http://sitefinity.brightdigital.co.uk

    My issue is this: When someone click the blog title link, it tries to show the blog item on the homepage itself. This is not what i want to happen, I just want the link to take them to the article itself.
    I have noticed it is appending the current URL with the URL of the blog item, when in actual fact I need it to redirect to the article.
    Could you let me know what I need to do to stop this behaviour?

    Thanks,
    Jaymie


  2. Daniel Plomp
    Daniel Plomp avatar
    112 posts
    Registered:
    14 Jun 2012
    12 Feb 2011
    Link to this post
    Yep, have the same question, but then from detail page to another page.
    Have you figured it out already?

    Regards,
    Daniel
  3. Roberto
    Roberto avatar
    18 posts
    Registered:
    12 Jan 2011
    14 Feb 2011
    Link to this post
    Nope, still an issue. Quite a major one :(
  4. Jaymie
    Jaymie avatar
    27 posts
    Registered:
    30 Jan 2009
    14 Feb 2011
    Link to this post
    No, this is still not working.
    I have been tearing my hair out for this. It looks like I am going to have to write code, but I don't really know where to start.
    The documentation for this is very limited and doesn't really help.
  5. Daniel Plomp
    Daniel Plomp avatar
    112 posts
    Registered:
    14 Jun 2012
    14 Feb 2011
    Link to this post
    Well, it looks like that for every custom thing you want, you need to override or extend classes. I hope this will bet better because I don't want to write custom classes for all these 'regular' functionality.

    Or maybe you guys have other thoughts?

    Regards,
    Daniel
  6. Roberto
    Roberto avatar
    18 posts
    Registered:
    12 Jan 2011
    15 Feb 2011
    Link to this post
    This has been sorted now. If you edit the blog on your homepage and click the Single Item tab, you can set it to view the articles on a specific page. I selected the Blog page I had already created and this solved my issue.
    Answered
  7. Daniel Plomp
    Daniel Plomp avatar
    112 posts
    Registered:
    14 Jun 2012
    15 Feb 2011
    Link to this post
    Hi Roberto,

    Yes, that I know. I've done it the same way.
    But I want this the other way around. How to get from the detailpage back to the homepage?

    Greetings,
    Daniel
  8. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    15 Feb 2011
    Link to this post
    Hi Daniel Plomp,

    If you want to get from a detailed page to a predefined list page you will have to go to Advanced section for the control. Then go to ControlDefinition-> Views -> DetailBlogPostsFrontend and set the id of MasterPageId to the id of your list page. Unfortunately this property is not yet exposed in the control designer.

    Best wishes,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Daniel Plomp
    Daniel Plomp avatar
    112 posts
    Registered:
    14 Jun 2012
    15 Feb 2011
    Link to this post
    Hi Radoslav,

    Where can I find the GUID of the particular page?

    Regards,
    Daniel
  10. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    16 Feb 2011
    Link to this post
    Hello Daniel Plomp,

    You can use the Sitefinity API to get it.

    Greetings,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
10 posts, 1 answered