Widget Templates - Blog

Posted by Community Admin on 03-Aug-2018 12:53

Widget Templates - Blog

All Replies

Posted by Community Admin on 10-Feb-2011 00:00

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:

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


Posted by Community Admin on 12-Feb-2011 00:00

Yep, have the same question, but then from detail page to another page.
Have you figured it out already?

Regards,
Daniel

Posted by Community Admin on 14-Feb-2011 00:00

Nope, still an issue. Quite a major one :(

Posted by Community Admin on 14-Feb-2011 00:00

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.

Posted by Community Admin on 14-Feb-2011 00:00

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

Posted by Community Admin on 15-Feb-2011 00:00

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.

Posted by Community Admin on 15-Feb-2011 00:00

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

Posted by Community Admin on 15-Feb-2011 00:00

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

Posted by Community Admin on 15-Feb-2011 00:00

Hi Radoslav,

Where can I find the GUID of the particular page?

Regards,
Daniel

Posted by Community Admin on 16-Feb-2011 00:00

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

This thread is closed