Hey Daniel,

This is certainly not the smartest solution but it's probably as good as
the requirements: ... you mentioned as long as they don't really exist
:) Couldn't you check in the executeShowPage action whether the
requested page_name is actually the name of an existing module, and if
so, forward to that module, otherwise display the requested page? It's
just a handful of code, and the only drawback is that it's not in the
routing.yml where it actually belongs.

Cheers,
Georg

Richtermeister schrieb:
> Hi all,
> 
> as of late I've been implementing a "page module" that allows me to
> create random static pages via wysiwyg editor. Since they are supposed
> to look like root-level pages, the page module (unfortunately) becomes
> king in my routing file.
> 
> For example:
> 
> /privacy.html
> 
> Routing rule:
> 
> page_module:
>   url:    /:page_name
>   param: { module: pages, action: showPage }
> 
> 
> Now, that works fine, but problem is that all the real modules can't
> easily be accessed by browsing to them and counting on their default
> action to fire, so in order to access the news module, I'd have to
> place the routing rule:
> 
> news_module:
>   url:   /news
>   param: { module: news, action: list }
> 
> above the rule for the page module. And I'd have to do this for every
> module.
> So my question is, is it possible to arrive at a construct such as:
> 
> module:
>   url:   /:module
>   param: { action: list }
>   requirements: { //module is a real module that exists in this app }
> 
> page_module:...
> 
> That would rock, methinks.
> Or how do you  guys go about serving "random" pages?
> 
> Thanks for help,
> have a great day,
> Daniel
> > 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to