Hi guys,
I’ve been fiddling arround with some settings and resources in MODx for the better part of a day now and I’ve almost completed what I set out to do. Pretty awesome considering I didn’t knew much about MODx when I started out.
Anyway, to get to my real question:
I’ve got a simple blog and website setup. Your avarage basic frontpage/home, a news with sections and categories, same for the blog and some other pages like profile, about and links. All well and good, but I stumbled onto a problem this afternoon. I’ve created a complete rundown of all the blogs with getResources. The snipper itself ignores all containers and so fetches all the posts/resources. Simply bloody awesome - seriously.
Now, of course, I can use the &tpl= variable to choose my layout which would be a chunk, obviously. This, too, worked like a charm, but now comes the fun part. When I directly go to the article/resource/post via a permalink I created (/section/category/resource-alias.html) my design is totally gone. Don’t get me wrong, the template I set up with the [[*content]] variable works perfectly, but it does not use the blogItem chunk (that’s how I named it, also used in getResources’ &tpl). Now, with MODx being a complete bitch with all it’s possibilities (this is a massive pro, not a con), I need a decent way to set it up. So, what do I do?
1. Create different templates in the Templates attrib in the menu (for frontpage, blogitem, post, contact stuff like that)
2. Create a chunk for the header, footer, menu and breadcrumbs, then use a template to only include the blogItem layout and of course the [[$siteHeader/Footer]]
Those are all the possibilities as I see them right now, but almost certainly I am missing like... 20 other options!
Oh yea, to give you a better idea of what I am talking about, here my menu tree. It’s all Dutch but that shouldn’t be a problem for you guys, as the idea is pretty the same.
Thanks a bunch guys!