Inside requestAction you have requestAction URL.

On Sep 11, 12:57 pm, zoran <[email protected]> wrote:
> <?php
>
> class MainMenusController extends AppController {
>
>         var $name = 'MainMenus';
>         var $uses = array('MainMenu');
>         var $lang;
>  /**
>  * All the admin_ functions are straight from cake's console bake
>  *
>  */
>
> function beforeFilter(){
> parent::beforeFilter();
> //definiranje jezika
> $this->lang=$this->Session->read('Config.language');
>
> }
>
> function index()
> {
>
> }
>
> function getPage()
> {
>
> print_r($this->params['url']);
>
> $url=$this->params['url'];
>
> $page=explode('/', $url['url']);
>
> if($page[0]==''){
> $page[0]='homes';
>
> }
>
> $results=$page[0];
>
> if(isset($this->params['requested'])) {
> return $results;
>
> }
> }
> }
>
> ?>
>
> Yes, I use requestAction() in every element template.
>
> On Sep 10, 7:43 pm, cricket <[email protected]> wrote:
>
>
>
> > On Fri, Sep 10, 2010 at 2:31 AM, zoran <[email protected]> wrote:
> > > OK, this is a real example URL 
> > > is:http://www.lupusweb4.net/locations/index/3/4
> > > If I call the command print_r ($ this-> params ['url']) from
> > > main_menus_controllers.php and function getPage() I expect the result:
> > > [url] => Array (
>
> > > [url] => locations/index
> > > [var1] => 3
> > > [var2] => 4
>
> > > )
>
> > No, there wouldn't be the leading "[url] => " because you explicitly
> > passed the 'url' key of $params. It would be like:
>
> > Array (
> >   [url] => locations/index
> >   [var1] => 3
> >   [var2] => 4
> > )
>
> > > but I get wrong result: Array ( [url] => main_menus/getPage ).
> > > Why???
>
> > Where is this print_r statement? And do you use requestAction() anywhere?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to