HomeHomeDotNetNuke Forg...DotNetNuke Forg...Module ForumsModule ForumsBlogBlogquery to give entries of blogquery to give entries of blog
Previous
 
Next
New Post
5/21/2009 9:03 AM
 

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 9:29 AM
 

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 9:34 AM
 

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

 
New Post
5/23/2009 4: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
HomeHomeDotNetNuke Forg...DotNetNuke Forg...Module ForumsModule ForumsBlogBlogquery to give entries of blogquery to give entries of blog


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Attend A Webinar
Free Demo Site
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

DotNetNuke Scoop!

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates the DotNetNuke Store where users purchase third party apps for the platform.