functionality differs with themes

Topics: Themes
Feb 1, 2008 at 9:31 AM
Hi,
I have downloaded BlogEngine.NET 1.3 and am able to make posts. When in the home page with the standard theme, I see a Section for authors in the side panel where you can see the authors who have contributed to this blog. If the theme is changed to something else say Dirtylicious, this Authors section does not appear.
Is this how it is configured to be or should i be making any config changes to make that Authors section appear?

Thanks in advance,
Harish.
Feb 1, 2008 at 10:58 AM
Edited Feb 1, 2008 at 11:01 AM
Theme functionality is subject to change from theme to theme. It deepends on how you make (program) your theme (code in .aspx and its code behind file).

Sample code from orginal "Standard" blogengine theme, from file PostView.ascx:

<h1><a href="<%=Post.RelativeLink %>" class="taggedlink"><%=Server.HtmlEncode(Post.Title) %></a></h1>
<span class="author">by <a href="<%=VirtualPathUtility.ToAbsolute("~/") + "author/" + Post.Author %>.aspx"><%=Post.Author %></a></span>
<span class="pubDate"><%=Post.DateCreated %></span>


Code from one of my themes:

<h1><a href="<%=Post.RelativeLink %>" class="taggedlink"><%=Server.HtmlEncode(Post.Title) %></a></h1>
<div class="publishedDate"><%=Post.DateCreated %></div>


As you can seee, I removed the line

<span class="author">by <a href="<%=VirtualPathUtility.ToAbsolute("~/") + "author/" + Post.Author %>.aspx"><%=Post.Author %></a></span>

which causes the output of Author name.

All of the above is for author names under post Heading.

The case you have is... well same analogy... Open SidePanel.ascx located in Standard theme and look for:

<div class="box">
<h1>About the author</h1>
<table summary="About the author">
<tr>
<td><img src="<%=Utils.RelativeWebRoot %>themes/Standard/noavatar.jpg" alt="Name of author" /></td>
<td style="vertical-align:top">
Author name<br />
Something about me and what I do.
<br /><br />

<!-- Email -->
<a href="<%=Utils.AbsoluteWebRoot %>contact.aspx" style="float:right;clear:both">
E-mail me <img src="<%=Utils.RelativeWebRoot %>pics/mail.gif" alt="Send mail" style="width:16px" />
</a>
</td>
</tr>
</table>
</div>


Those line of code cause the About author box to be displayed on a page. Some themes don't use it, therefore you can't see it.

Hope I've helped!
Feb 1, 2008 at 5:37 PM
Hi,
Thank you very much! That cleared my doubt.