Need help using dashes in action names

4 messages Options
Embed this post
Permalink
cvaughn001

Need help using dashes in action names

Reply Threaded More More options
Print post
Permalink
Hey everyone. I tried searching for this answer before posting my question, and nothing came up.

My question is as follows: I want to make my script views have dashes in between their names, like "page/this-page.phtml". Now, in my "page" controller, how would I format the Action to use the "-" in the phtml file?

Thanks in advance.
weierophinney

Re: Need help using dashes in action names

Reply Threaded More More options
Print post
Permalink
-- cvaughn001 <[hidden email]> wrote
(on Monday, 22 October 2007, 10:23 AM -0700):
> Hey everyone. I tried searching for this answer before posting my question,
> and nothing came up.
>
> My question is as follows: I want to make my script views have dashes in
> between their names, like "page/this-page.phtml". Now, in my "page"
> controller, how would I format the Action to use the "-" in the phtml file?

Use camelCasing: PageController::thisPageAction() maps to
page/this-page.phtml.

--
Matthew Weier O'Phinney
PHP Developer            | [hidden email]
Zend - The PHP Company   | http://www.zend.com/
cvaughn001

Re: Need help using dashes in action names

Reply Threaded More More options
Print post
Permalink

Matthew Weier O'Phinney-3 wrote:
-- cvaughn001 <cvaughn001@gmail.com> wrote
(on Monday, 22 October 2007, 10:23 AM -0700):
> Hey everyone. I tried searching for this answer before posting my question,
> and nothing came up.
>
> My question is as follows: I want to make my script views have dashes in
> between their names, like "page/this-page.phtml". Now, in my "page"
> controller, how would I format the Action to use the "-" in the phtml file?

Use camelCasing: PageController::thisPageAction() maps to
page/this-page.phtml.

--
Matthew Weier O'Phinney
PHP Developer            | matthew@zend.com
Zend - The PHP Company   | http://www.zend.com/
do i still keep the "-" in the phtml file or remove it when im camel casing the Action?
weierophinney

Re: Need help using dashes in action names

Reply Threaded More More options
Print post
Permalink
-- cvaughn001 <[hidden email]> wrote
(on Monday, 22 October 2007, 10:59 AM -0700):

> Matthew Weier O'Phinney-3 wrote:
> > -- cvaughn001 <[hidden email]> wrote
> > (on Monday, 22 October 2007, 10:23 AM -0700):
> > > Hey everyone. I tried searching for this answer before posting my
> > > question,
> > > and nothing came up.
> > >
> > > My question is as follows: I want to make my script views have dashes in
> > > between their names, like "page/this-page.phtml". Now, in my "page"
> > > controller, how would I format the Action to use the "-" in the phtml
> > > file?
> >
> > Use camelCasing: PageController::thisPageAction() maps to
> > page/this-page.phtml.
>
> do i still keep the "-" in the phtml file or remove it when im camel casing
> the Action?

Keep the dash in the view script, but no dash in the action. It's
exactly as I described it above.

--
Matthew Weier O'Phinney
PHP Developer            | [hidden email]
Zend - The PHP Company   | http://www.zend.com/