- This topic has 0 replies, 1 voice, and was last updated 8 years, 10 months ago by Layer7web.
Viewing 0 reply threads
-
AuthorPosts
-
-
January 3, 2016 at 7:12 pm #2212
Layer7webKeymasterThere are two way to create layout in fuelCMS. One way is to create a file with the same name as your view file.
In this file you add the layout variable:fuel/application/views/_variables/yourpage.phpPHP1$vars['layout'] = 'yourlayout';I don’t like this way because we are creating a file we don’t really need and we are adding a little more confusion to the architecture of the application. By using the following code at the top of your view file you can set the layout.
fuel/application/views/yourview.phpPHP1fuel_set_var('layout', 'yourlayout');By doing it this way the next engineer will know just by looking at the view file exactly what layout it is using.
-
-
AuthorPosts
Viewing 0 reply threads
You must be logged in to reply to this topic.
Comments are closed.