Tobias Kremer wrote: > Hmm .. Isn't this somehow violating the MVC principle to at least some > degree? I mean the controller's supposed to specify a view (i.e. template) > not the other way round, isn't it?
The main purpose of the metadata is to map URLs to controllers. The controller chooses which template to use. There are at least two screens in all of our apps, and we publish separate templates (in the same directory) for them. > Are your metadata files also stories? "Stories" are the unit that the CMS users think in, e.g. I want to put a petition at this URL and a login page at this URL, and an article (non-interactive) at this URL. The metadata is just one of the things we publish to that directory for use by the front-end, along with the templates. > If I'm understanding you correctly > you have at least two files for every story (article): > > /my/category/story.html > /my/category/story.stub or .xml or .whatever Yes, and typically more templates than that. > What's your definition of "application"? Something like the examples above: petitions, login, search, etc. > Yes, I also thought about a regex solution, but I don't feel very well > with > this approach. Have to think about it some more. Using the URLs as > (foreign) > keys could have a noticable impact on the database performance, I suppose. It should be a unique key, so I expect it will not hurt performance in any noticeable way. - Perrin _______________________________________________ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/