Hi,
I was wondering is it possible to use a different template for a document as opposed to the listing page? The design I’m working with has things such as custom date formats (different divs for month, year, day etc etc which I can do with Ditto fine). As far as I know I can’t use the ditto place holders outside of Ditto, so I was wondering whether you can specify the "article" template as a chunk?
Thanks
-
MODX Staff
- 2,502 Posts
What you do in this case is just create a new MODx template based on your site template just for articles. Ditto just shows serialized content from documents but the documents themselves use a page template.
Hope this makes sense,
Jay
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
Sorry I meant use phx outside of Ditto.
I guess I can tell my users to select a new template everytime they create an article, just was wondering if there was a way of doing it without them having to choose anything.
1) You can use a plug-in to pre-select the template
2) Use a snippet rather than PHx to do the logic for determining the template
3) Install PHx as a Plug-in and use it the same way you would inside of Ditto.
Quote from: hOtTiGeR at Jan 19, 2009, 02:54 PM
Sorry I meant use phx outside of Ditto.
I guess I can tell my users to select a new template everytime they create an article, just was wondering if there was a way of doing it without them having to choose anything.
By default, docs can get the template of their parent folder, so if you can have the docs created in the appropriate folder, that might solve your problem.