Welcome to the archive of the old FlatPress support forum. Browse more than a decade of FlatPress wisdom! Login is disabled.

The current FlatPress support forum is available here: forum.flatpress.org
A question about using differents layout on a theme
  • I am making my own theme for flatpress (http://angelus_ira.byethost12.com/, test site for my web), and i would like to have diferent layouts on the post (similar to wordpress, on wich you can post on one column (only content), two columns (content and sidebar)). In my site i have two diferent kinds of post, the regular post (two column layout), and the tutorial post (one column, just the content using al the space). The only solution for my post was the use of the statics page, but that is not the solution i am looking for. What i need is the option to choose the layout in which a post is show. I am asking someone can tell me the files I should be looking for (even if there is a need to make a plugin). Sorry for he bad english...
  • Take a look at this old topic and see if it helps you. You can change the include file depending on which category you select (which means that you can have different layouts for different categories) so that might be the solution you need. Study the diagram which the original poster provided here to get a better idea.
  • Not exactly what i need, but i think it will do the right job. I am new on smarty and flatpress, so i do not know how to use a lot of features, but if i make something usefull i will upload the code. Thanks for the help.
  • I think Stanley wanted to say that you have to put all your tutorials in the tutorials category and then, if the post has this category, don't show the sidebar. I think you should be able to do via Smarty: for example, if the category of the tutorial is the number 5, this code would do all you want: {* Put it in the entry block *} {if in_array(5, $categories)} {assign var='nosidebar' value='true} {/if} {* Replace {include file='widgets.tpl'} with this: *} {if empty($nosidebar} {include file='widgets.tpl'} {/if}
  • Thanks for the help. I used the pierovdfn method.
Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion