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

Dynamic Sidebar using CClipWidget

Updated 3 years ago by CozumelHow-tos5 comments – viewed 27,597 times – ( +21 / -1 ) – 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

Updated 4 years ago by Maurizio Domba CerinHow-tos0 comments – viewed 21,333 times – ( +2 / -1 ) – 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.