Wiki

Articles tagged with "cclipwidget", sorted by viewsX
Displaying 1-2 of 2 result(s).

Dynamic Sidebar using CClipWidget

Created 3 years ago by SheldmanduHow-tos5 comments – viewed 22,859 times – ( +21 ) – version 1.1
Most applications will have one or two sidebars and often you want to control the content that should appear in the sidebar based on the action. For example you will want to show something different on the homepage as opposed to some view page. While achieving this you generally also want to avoid putting the layout into each view, as that would mean if you wanted to change the layout (e.g. put the sidebar on the left instead of the right or do some funky layout which requires an additional div tag to be added) you'd have to go through every view, which does not achieve good code re-use. It is also bad practice to have lots of if statements in column2 layout just so that you can generate the sidebar correctly.

pass variables or content block from view file to layout file

Created 2 years ago by yiqing95How-tos0 comments – viewed 14,278 times – ( +2 ) – version 1.1
If you use yiic to generate webApplication there will be a layout folder under the protected/views/, and the Controller class under protected/components which will use by default these layouts files.