Jump to content
Larry Ullman's Book Forums

Naming Of Static Pages


Recommended Posts

I've been able to create static pages through the SiteController using the ViewAction class. One thing I have not been able to figure out is whether it's possible to have static views using the Yii convention for views of lowerCamelcase but have the url have hyphens in it.


For example, if I name the static view file designProcess.php, then www.domain.com/designProcess will display the view file properly.


However, if I want to use www.domain.com/design-process, then I have not been able to figure out a way to route that to display the designProcess.php file. I can rename the view file design-process.php, but that goes against the Yii naming convention.


I realize I could create a function actionDesignProcess() in the SiteController and with the proper rule in the urlManager, route design-process to actionDesignProcess(), but I'd prefer to use the ViewAction class for static pages.


Any help would be appreciated.





Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...