Re: How Do I Display The Latest News...
[email protected] (mikespub) Thu, 24 Jul 2003 16:59:58 GMT
| Newsgroups | gmane.comp.cms.xaraya.knowledge-base |
|---|---|
| Organization | not much |
| Message-ID | <[email protected]> |
In article <bfc3qn$a41$1-111RdWWlOxkOkXtL6OYfHgC/[email protected]>, [email protected] wrote: >How do I display the latest news articles from a specific topic? > >For example, I have 20 news topics. I want to be able to show the latest >headlines from one specific topic. > >I see how to display the latest articles from the entire group of news >topics, but I don't see how to do it for one topic. > >Is this possible? Have I just not looked hard enough? Any help is >appreciated. > >MJT Depending on what exactly you're trying to do, you could : 1) use a block The articles/topitems or articles/featureditems already allow you to select articles of a particular pubtype (optionally), so it shouldn't be difficult to extend them to support an optional category as well. Default behaviour should remain the same though, to avoid any conflicts with current sites. 2) use syndication John's favorite trick - this may not work on Windows depending on your webserver version, and some hosting companies won't allow fopen() connections for security reasons either. 3) use a menu link that points to articles view with the right pubtype + categories 4) use the articles_user_view GUI call to retrieve and display the articles you want. You can even use this directly in your template if you want : #xarModFunc('articles', 'user', 'view', array('ptid' => 1, 'catid' => 2))# 5) use the articles_userapi_getall() API call to retrieve the articles you want, and pass them along as variables to your template Mike.