My new idea is to create URLs with underscore in the pageName, like this:
http://www.myurl.com/cms/en/default/information_public.html
So I can use the Router:
Zend_Controller_Router_Router(':lang/:module/:pageName/*');
In this case I only have to split the 'pageName' by underscore and get the
correct pages.
Matthias W. wrote:
>
>
> vince. wrote:
>>
>> By default the router uses /:controller/:action/* or if you have modules
>> then /:module/:controller/:action/* the /* indicates that anything can be
>> there instead so i think you should use just that.
>>
>
> OK, but I didn't mean this.
>
> I want to create a CMS (Content Management System)
>
> The pages of the CMS are created dynamically, so I have for example a
> database table which contains the ID, name, content, rights, ... of a page
> I created over the backend.
>
> For example I created the pages 'information' and 'public'. The page
> 'public' is subpage of the 'information' page. Now I want to call this
> page by the URL: http://www.myurl.com/cms/en/default/information/public or
> better: http://www.myurl.com/cms/en/default/information/public.html
>
> 'cms' is the folder of the application (could also be in document root)
> 'en' is the language
> 'default' is the module (not required)
> 'information' is the first page created dynamically over the backend
> 'public' is the second page created dynamically over the backend
>
> So I need a CmsController with its indexAction in background which is
> called by default.
>
> First I wanted to route like this:
> Zend_Controller_Router_Router(':lang/:module/:pageId/:pageName/*');
> with the defaults:
> $defaults = array(
> 'lang' =>
> $this->_config->options->language->default,
> 'module' => 'default',
> 'controller' => 'index',
> 'action' => 'index',
> 'pageId' => 1,
> 'pageName' => 'index.html',
> );
>
> But this URL isn't that good because it includes the ID of the page and
> the parent pages aren't included in the URL.
>
--
View this message in context:
http://www.nabble.com/Router-for-CMS-tp22324969p22326114.html
Sent from the Zend Framework mailing list archive at Nabble.com.