Difference between #1 and #2 of
A simple go back button widget

Revision #2 has been created by bennouna on Oct 4, 2012, 7:33:37 PM with the memo:

Some corrections related to Markdown syntax
« previous (#1)


Title unchanged

A simple go back button widget

Category unchanged


Yii version unchanged

Tags unchanged

yii, Widgets, button, goback button

Content changed

Why a widget ? Simple, we can extend the variables and make it as complex as we want, but will not be this case ;). We are going to pass just 1 variable if we need it.

Under your ext folder or widget folder ( mine under **protected/ext/data** ) create the following widget:


class EBackButtonWidget extends CWidget {

``` Where: <br/> 
1. Back is the text that the button will show. <br/> 2. name will be the name of the button  <br/> 
3. class just in case that you want to do it pretty :).
4. styles that you want to use. In my case I will change the width.
To call this widget we simple:



Where :
1. application.ext.data.EBackButtonWidget is the path to our widget.<br> 2. width will be the width param that we give to the widget.<br> And that is it !! <br>
Here's a very readable link in spanish to the original [tutorial][original]. [original]: http://www.cristiantala.cl/crear-un-widget-en-yii-boton-volver/
2 1
Viewed: 26 386 times
Version: 1.1
Category: How-tos
Written by: CTala
Last updated by: bennouna
Created on: Oct 4, 2012
Last updated: 5 years ago
Update Article


View all history