@Guillermo: Sorry, the message was for him! what you say is the correct way
of do it no matter what ^^

anl


On Thu, Feb 11, 2010 at 3:13 PM, Guillermo Mansilla <[email protected]>wrote:

> Yes you are right, but since he said he needed a button I told him how to
> use it to achieve what he wanted. But in theory you are right he should use
> a link and apply some style, however that link will have to point to a
> controller function which renders a desired view, just like I told him. ;-)
>
> On 11 February 2010 09:39, anl hp <[email protected]> wrote:
>
>> Why you want to use a button?
>> Buttons must be used when your sending a post request to the server (and
>> this request should change something in the app)
>> When what you want is just do a get request, you should use links (you can
>> style it as a button if you want)
>>
>> anl
>>
>>
>>
>> On Thu, Feb 11, 2010 at 3:02 PM, Guillermo Mansilla 
>> <[email protected]>wrote:
>>
>>> You have to create your button and lock it inside a form which points to
>>> a controller action that renders a view.
>>> in your view
>>> echo $form->create('MyForm', array('controller'=>'foo', 'action' =>
>>> 'bar'));
>>> echo $form->end('My button');
>>>
>>> in your foo_controller:
>>>
>>> function bar(){
>>>        $this->render('theViewYouWantToRender');
>>>
>>> }
>>>
>>>
>>>
>>>
>>> On 11 February 2010 09:17, sebb86 <[email protected]> wrote:
>>>
>>>> Jeremy
>>>>
>>>> Thanks for your answer.
>>>> But actually i'd like to create a button (not a button-picture), which
>>>> links to a view.
>>>> I don't want to add a picture, because every button would have an
>>>> other description.
>>>> So is this possible to realize or must i create lots of pictures? ;-)
>>>>
>>>> Thanks.
>>>>
>>>> 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]<cake-php%[email protected]>For
>>>>  more options, visit this group at
>>>> http://groups.google.com/group/cake-php?hl=en
>>>>
>>>
>>>  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]<cake-php%[email protected]>For
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>
>>  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]<cake-php%[email protected]>For
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  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]<cake-php%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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