Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsBlogBlogSummary or DescriptionSummary or Description
Previous
 
Next
New Post
6/16/2010 5:57 PM
 
Hi Guys,

I have been racking my brain on this one. I am trying to display the recent posts from a particular blog on my homepage, kind of a latest news snippet. Sounds easy since I can use related posts module already built in. But what I want is to use the summary field or better again if I could, use the description field BUT I want to limit the characters returned (so I don't get the full post , say 200)
I have been using the reports module to try it out and have come close with the below query, however I get column headers and no links to the actual post. What I want is Title (to be the link) the date posted next to it on the same line and on the next line a snippet of the post.

SELECT TOP 3
     Blog_Blogs.Title as 'Source'
    ,Blog_Entries.Description as 'Summary'
    ,Blog_Entries.AddedDate as 'Date'
FROM
    Blog_Entries
    INNER JOIN Blog_Blogs on Blog_Entries.BlogID = Blog_Blogs.BlogID
WHERE
    Blog_Blogs.PortalID = @PortalID
    AND Blog_Blogs.[Public] = '1'
    AND Blog_Entries.Published = '1'
ORDER BY
    Blog_Entries.EntryID DESC

 
New Post
6/17/2010 2:05 PM
 
Another example why you should take a break and come back to something. Just edit the settings on the Recent Entries module to show <div class="Blog_RecentEntries"><a href="[PERMALINK]" class="Blog_RecentEntries_Title">[TITLE]</a><div class="Blog_RecentEntries_Dateline">Posted on: [ADDEDDATE]</div><div class="Blog_RecentEntries_Description">[DESCRIPTION]</div></div>
 
New Post
6/17/2010 3:07 PM
 

Leslie,

Thanks for that, its really good, I have been trying to do this for a while.

How do you have the blg modules set up on your news page? When I click the article on the home page it takes me to the news page but doesnt open the article.

Many Thanks, John

 
New Post
6/17/2010 3:14 PM
 
Hi John,

Just tested here on my system (localhost as I am developing at the moment) and it takes me straight to the article. I am running the latest version of the Blog module on DNN 5.2.0 maybe check your module version.

I have just added a css style in my skin for Blog_RecentEntries_Title;

.Blog_RecentEntries_Title{
font-size:20px;
font-family:Times New Roman, Arial, Tahoma;
}

Modifed the settings of the recent blogs to;

<div class="Blog_RecentEntries_Title">[TITLE]</div><div class="Blog_RecentEntries_Dateline">Posted on: [ADDEDDATE]</div><div class="Blog_RecentEntries_Description">[DESCRIPTION]&nbsp;<a href="[PERMALINK]" class="Blog_RecentEntries">Click here to read more...</a></div>

Looks a bit better ;-)
 
New Post
6/19/2010 8:02 AM
 
Hi Leslie,

Thanks it is working now.

Cheers, John
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsBlogBlogSummary or DescriptionSummary or Description


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out