php - Yii how to make controller action with replace string -


how best way create action in controller more user friendly??? use :

http://pastebin.com/afibvfrs

in every controller made put called url

ex : www.domain.com/news/my-profile.html 

with of code managed make page displayed properly, because sign "-" replaced "_" made controller read name of action.

but method can't used if use function display data database .. example: cactivedataprovider. when call page comes out error is:

fatal error: call member function getid () on non-object in / home/z65111222/framework/yiilite.php on line 3860

is there better way make action still called using sign "-" instead of "_"

i think of want should

custom url friendly class

if have no idea above class purpose, read

http://www.yiiframework.com/doc/guide/1.1/en/topics.url#using-custom-url-rule-classes

once got idea, , want more custom on own, link help

yii - make string usable in url or filename

at last, if want suffix .html, add below line urlmamanager (on app config)

'urlsuffix'=> '.html', 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -