Static Pages With Urlmanager

Hi

I’m having problems with setting up a controller action, to catch all my static pages.

Eg. I want these static pages to hit SiteController, actionStaticcontentpage:

about

contact

user/help

user/purchase/help

In my config, this works

‘about’ => ‘site/staticcontentpage’

But when I try to catch the ones with slashes in them,

‘user/help’ => ‘site/staticcontentpage’

‘user/purchase/help’ => ‘site/staticcontentpage’

Nothing works, and I can’t seem to find any examples of how to make this work.

Can anyone help me?

do take at these articles might help you

http://www.yiiframework.com/forum/index.php/topic/11052-pretty-urls-and-static-pages/

http://www.yiiframework.com/wiki/22/how-to-display-static-pages-in-yii/

Check this article:

http://www.yiiframework.com/doc/guide/1.1/en/topics.url


'urlManager' => array(

            'showScriptName' => true,

            'urlFormat' => 'path',

            'rules' => array(

                '' => 'site/index',

                'login'=>array('user/login'),

                'logout'=>array('user/logout'),

                'registration'=>array('user/registration'),

                'recovery'=>array('user/recovery'),

                '<view>'=>array('site/page'),

                // another possability'<view:(about|impressum)>'=>'site/page',

                'contact' => 'site/contact',

            ),

        ),

Hey

I got it working with this code:

‘<view:(about|impressum)>’=>‘site/page’,

Which I had tried before. When I saw you wrote it, it gave it another go. And the problem was that I had another "catch-all" rule that triggered before mine. So all I needed was to move mine up above it.