Widget Templates - Blog
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
>
Yep, have the same question, but then from detail page to another page.
Have you figured it out already?
Regards,
Daniel
Nope, still an issue. Quite a major one :(
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.
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,
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.
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,
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
Hi Radoslav,
Where can I find the GUID of the particular page?
Regards,
Daniel
Hello Daniel Plomp,
You can use the Sitefinity API to get it.
Greetings,
Radoslav Georgiev
the Telerik team