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 ForumsBlogBlogquery to give entries of blogquery to give entries of blog
Previous
 
Next
New Post
5/21/2009 12:03 PM
 

Hi, i managed to get latest blog post entries links displayed in Core Reports module using the following query:

select top 5
    '<a href="'+PermaLink+'">'+ble.Title+'</a>' 
  as [Latest Blog Entries]
  from blog_entries ble
  inner join blog_blogs bb on bb.Blogid = ble.Blogid
  where ble.Published = 1
  and bb.Portalid = @portalID
  order by ble.AddedDate desc

Thanks a lot,

Swaminathan.T

 
New Post
5/21/2009 12:29 PM
 

Hi Nathan,

don't forget to filter out blogs that are not public:

SELECT TOP 5
  '<a href="'+E.Permalink+'">"+E.Title+'</a>'
  AS [LatestBlogEntries]
FROM Blog_Entries E
INNER JOIN Blog_Blogs B ON B.BlogID = E.BlogID
WHERE E.Publshed = 1
AND B.PortalID = @PortalID
AND B.Public = 1
ORDER BY E.AddedDate DESC

But there are many other variants.

Bes regards,
Dario Rossa

 
New Post
5/21/2009 12:34 PM
 

Dario Rossa wrote

Hi Nathan,  don't forget to filter out blogs that are not public:

SELECT TOP 5
  '"+E.Title+''
  AS [LatestBlogEntries]
FROM Blog_Entries E
INNER JOIN Blog_Blogs B ON B.BlogID = E.BlogID
WHERE E.Publshed = 1
AND B.PortalID = @PortalID
AND B.Public = 1
ORDER BY E.AddedDate DESC

But there are many other variants.

Bes regards,
Dario Rossa


 

For anyone who may care to read the full write-up, the original posted SQL is the simple solution I created and posted at S.Nathan's request (via the blog comments at our website) in our latest blog entry:
 
   Quickly create a "latest blogs" list with the REPORTS module
   http://www.eguanasolutions.com/DNN_Blog/EntryID/34.aspx
 
Dario's point regarding the "public" flag is a good one I'd overlooked -- I'll update the post (and credit Dario with the update, of course!).
 
Cheers-
-mamlin


esmamlin atxgeek.me
 
New Post
5/23/2009 7:56 AM
 

Hi Mamlin,

Thanks a lot for creating sql solution for latest blogs.

Along with latest blogs, the title "Latest Blog Entries" is displayed which i don't want to show.

Since i show container for every modules, latest blog module title i give from container and since i want the font type and color to be same for all module headers.

Thanks Dario for your suggestion to filter out non public blogs.

Awaiting your suggestion asap.

Thanks,

Swaminathan.T

 

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsBlogBlogquery to give entries of blogquery to give entries of blog


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