I am converting my wordpress blog to DNN. I am learning DNN along the way, so please excuse my ignorance as I struggle through this. I am trying to modify the blog post title section.<wordpress site converting : www.frustrated-inc.com> I have recreated the blog title section in DNN and created a div section that will be on the far right showing the Mth and the Date of the post as seen on my live site www.frustrated-inc.com. I have the block created and just for the life of me can't figure out how to actually put the Mth or the Date of the post in that block.
wordpress section I am trying to recreate:
ViewBlog.ascx:
<ItemTemplate>
<div class="BlogBody">
<!-- Begin Blog Entry Title -->
<div class="BlogHead">
<div class="BlogDate"> <!-- My modification -->
<div class="BlogPubMonth"></div> <!-- My modification -->
<div class="BlogPubDate"></div> <!-- My modification -->
</div>
<h2 class="BlogTitle">
<asp:HyperLink ID="lnkEntry" runat="server">
<%# DataBinder.Eval(Container.DataItem, "Title") %>
</asp:HyperLink>
</h2>
</div>
-----------------------------------------------
skin.css;
/* Blog section embedded in contentpane --- post/ comment section----------*/
.BlogBody
{
width: 95%;
margin-left: 3%;
}
/* Blog elements inside BlogBody ----------*/
/* Blog Title section --- need to combine .BlogHead and .BlogSubHead -------*/
.BlogHead
{
height: 60px;
background-image: url(images/post_title_bg.png);
background-repeat: no-repeat;
}
/* Post Date section */
.BlogDate
{
float: left;
width: 60px;
height: 60px;
}
.BlogPubMonth
{
display: block;
height:20px;
font-family:"Arial", "Helvetica", "Times New Roman", "sans-serif";
font-size: 10px;
font-weight: 700;
color: #FFF;
text-transform: uppercase;
margin: 0;
padding: 1px 0 0;
background-color: Yellow; /* temp setting to confirm mth element block is positioned correctly - */
}
.BlogPubDate
{
display: block;
height:30px;
font-size: 10px;
margin: 0;
padding: 0;
background-color: green; /* temp setting to confirm date element block is positioned correctly - */
}
I have searched and searched for a resolution to this problem, but i have no experience with JAVA or AJAX, or whatever method used to pull the Date information from the Blog post creation date to place the correct values inside my mth/date blocks. I did run across a post on a blog as seen below. But I have no clue what it means or how it works - but It seems to contain the elements I am attempting to place in my Post Date section.
Open up ViewBlog.ascx, locate and add the following after theDIV.BlogHead (line 49)
<div class="BlogPublished" title="<%# DataBinder.Eval(Container.DataItem, "AddedDate") %>"> <span class="BlogPubMonth"> <%# Left(MonthName(Month(DataBinder.Eval(Container.DataItem, "AddedDate"))), 3) %> </span> <span class="BlogPubDate"> <%# Day(DataBinder.Eval(Container.DataItem, "AddedDate"))%> </span> </div>
Is there anyone out there that can help me achieve getting the date elements to be shown inside my Post Date section?
Thanks to all that take a look.