As our blogging module #SunBlogNuke# are applied in more DNN websites, some clients requires customization based on their specific requirements. The unique UI layout including theme will be a common issue. Toady we would like to share tokens reference of theme view with some samples so that you can get started to customization easily.
<%=CategoryLinks(", ")%>
<%=CategoryLinks(", ", "<a href=\"{0}\" title=\"View all posts in {1}\">{1}</a>")%>
TagLinks(string delimiter): like the method CategoryLinks(string delimiter) Code Sample:
<% String tags = TagLinks(", "); if(!String.IsNullOrEmpty(tags)){%> <div class="blog-icon post-tags"><%=LocalizeByKey("tags")%> <%=tags%></div> <% } %>
TagLinks(string delimiter, string token): like the method CategoryLinks(string delimiter, string token)
<img src="<%=AvatarUrl(36)%>" alt="<%=Entry.Author%>'s avatar" class="avatar" width="36" height="36" />
Entry.AuthorProfile: the same object like dnn core profile so you can retrieve more other DNN profile properties. Code Sample:
<% var objAuthor = Entry.AuthorProfile; var profileValue = objAuthor.GetProfileProperty("CustomProfileField");%>
And here are some useful links:
http://www.sunblognuke.com/blog/entryid/175/enhance-dnn-articl-footers-with-author-profiles.aspx http://www.sunblognuke.com/support/forums/mulit-user-post-issues.aspx http://www.sunblognuke.com/support/forums/other-profile-properties.aspx
<%=Entry.PostedTime%>: the published date of current post. If you would like to build your own format, you can try it like that:
<% var dateTime = System.DateTime.Parse(Entry.PostedTime); %> <%=string.Format("{0:f}",dateTime)%>
Entry.IsShowMoreLink: bool value to check whether show more link. Code Sample:
<%if(Entry.IsShowMoreLink){%><p><a class="post-readmore" href="<%=Entry.Link%>"><%=LocalizeByKey("lnkMore")%></a></p><%}%>
<%=Entry.CommentLink%>: the url to direct to comments list of current post. Code Sample:
<a href="<%=Entry.CommentLink%>" rel="nofollow"> <% if (Entry.CommentCount <= 0) { %> <%=LocalizeByKey("NoComments")%> <% } else { %> <%=Entry.CommentCount%> <%=LocalizeByKey("lnkComments")%> <% } %> </a>
Entry.AlternativeThumbnail: alternative thumbnail of current post, if the field “thumbnail” is empty, it will retrieve the first image of post content as post thumbnail.
Entry.Thumbnail: the thumbnail of current post. Code Sample:
<% if (!string.IsNullOrEmpty(Entry.Thumbnail)) { %> <div class="catItemImageBlock"> <a href="<%=Entry.Link%>" title=""> <img src="<%=Entry.Thumbnail%>" alt="<%=Entry.Title%>" style="width: 302px; height: auto; "/> </a> </div> <% } %>
Those usages above may be enhanced with some changes in the later package. If you have any question please feel free to contact us or raise your issue in our support forum. Thanks.
Note: more samples or tokens will be added later.
Related resources:
Develop an Customized Theme
Tokens Replace Reference
Extend DNN Blog With Custom Fields
Senior developer for dnn solution & founder of ultimate dnn blog module - SunBlogNuke, which is the best publishing tool for DotNetNuke (DNN) websites, with a focus on simplicity, ease of extensibility, web standards and usability. It includes a great suite of modules for blogging on your DNN site.
Re: DNN7 Blog Integrated with ModuleSearchBase
B- please FIX the bugs...driving me nuts!!!! Error: Edit blog entry is currently unavailable. DotNet...
-- kkuhns
Re: Fighting DNN Bugs Ⅱ: Why Can't Remove Google Analytics
Thanks a lot for your reference and it should be helpful for community guys. :)
-- Baldwin
please ensure you log any bugs to http://support.dnnsoftware.com - i searched and couldnt see this one...
-- Cathal
Re: Build DNN Rotator with GalleryPlus
How do you place the gallery within a blog entry. I saw in the below demo that a token was used ([SL...
-- Mary
Re: Enhance DNN Article Footers with Author Profiles
Please make sure that the bio field of this current host user is visual to public(you should find it...
I'm trying to get the bio to show up for a host user but it comes up blank. Can you replicate this issue...
-- Lucas
Re: [Kudos]DotNetNuke Blog Module In Depth Review
Yes, the latest package is absolutely compatible well with DNN7 and the performance was enhanced a lot...
Is it compatible with DNN 7
-- swayam
Re: SunBlogNuke 6.0 Technology Preview
No, actually the v6.0 had been available to downlaod for upgrade - http://www.sunblognuke.com/blog/entryid...
this article says that version 6.0 is not for production use. the article is from may 2013... is sun...
-- pekai
The opinions expressed here in are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2009 - 2024