Showing latest posts on non-blog page

14 views
Skip to first unread message

S Flynn

unread,
Jun 23, 2014, 8:30:32 PM6/23/14
to blo...@googlegroups.com
I'm an eternal noob at CF, but i did manage to get the Blog rolling.  Yay!


My question is: What's the best way to show the latest blogs (title, teaser, URL) on my regular website home page (not part of the blog)?


Knowing what a CFMonster Ray Camden is, i'm assuming there's a more elegant solution than me trying to query the db!  That's always a disaster.  :-)



Stephen Moretti

unread,
Jun 24, 2014, 3:45:53 AM6/24/14
to blo...@googlegroups.com
Use the RSS feed?


--
You received this message because you are subscribed to the Google Groups "BlogCFC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blogcfc+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

S Flynn

unread,
Jun 24, 2014, 10:34:00 PM6/24/14
to blo...@googlegroups.com
Indeed!  Thanks Stephen!  

My friend just threw this at me and it works like a charm:

       <cfoutput>
 <cftry>
                                    <cffeed action="read" source="http://www.yourwebsite.com/blog/rss.cfm?mode=full" name="myFeed" >
                                     <cfloop from="1" to="5" index="i">
                                      <li>
                                        <a href="#myFeed.item[i].link#" style="font-size:14px;">
                                        #myFeed.item[i].title#
                                        </a>
                                        
                                        <br />
                                        
                                        <small>
                                        #dateformat(myFeed.item[i].pubDate, 'MMMM d, YYYY')#
                                        </small> 
                                     </li>
                                    </cfloop>
                                  
                                    <cfcatch>
                                       Sorry, there was an error loading the blog information
                                    </cfcatch>
                 </cftry>
</cfoutput>
Reply all
Reply to author
Forward
0 new messages