Hello,
I am about to start building a website that needs a news section.
News items on the client’s existing (non MODx) site are currently listed in PDF format from most recent to least recent.
It is possible that news items on the new site will be in pdf or html formats.
Given we’d like to:
+ control the publish / unpublish dates of some news items (possibly all - I am not certain on that at this stage)
+ list the news items from most recent to least recent (and perhaps include an html heading for each relevant month to break up the list)
+ potentially also list the news items by sub categories such as marketing, financial etc
+ probably also provide an archive facility - anything say over 3 months is archived - the archives could be accessible by clicking on a rhs menu listing months for example.
What’s the best way to include pdf’s as news items? Should I create a new "weblink" for each pdf or do I create a new blank page with no template for each pdf or is there another (best practice) way of working with pdf’s?
And what’s the best to display the list of news items on screen - with ditto or wayfinder (or something else)?
Any suggestions pointing in the right direction are much appreciated.
Thanks in advance.
Use modx documents with a File type TV (Template Variable) for each PDF is the standard method. Then you would use Ditto with a custom tpl to display and sort as you want. Tip: create a template for documents, no need for any html, and add a redirect snippet to make the document inaccessible (or unpublish it since Ditto can read unpublished documents, I usually redirect to the error page).
Hello dev_cw,
Always to my rescue!
I am sorry to waste your time but I’m not quite sure what you mean by "Use modx documents with a File type TV (Template Variable) for each PDF".
How on earth do I do that?
Any chance you could elaborate?
Thank you kindly.
Hi again Shane,
Thanks for clarifying that and for the links.
They should point me in the right direction.
Great Nettuts tutorial by the way!
OK - so I build a TV for the pdfs and link them from a template and then use Ditto to list/sort etc - I will have a play next week.
I’ve used TV’s before but not for this kind of thing - I use them to insert rhs column content, scripts into the head of some pages and the like
Thanks again.
Nick
-
MODX Staff
- 12,272 Posts
Also keep in mind that Revo includes static resources as content types. That means any file on the filesystem in addition to the normal virtual web pages being generated from the DB.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me