ℹ️
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
Can I display widgets inside index.tpl?
  • I'm trying to use the static pages as basic page content, I removed "archives", "last posts" and "categories" from the main menu while keeping the blog entries available only by clicking the blog link from the menu. Question: is there a way to display "archive", "categories" and/or "last entries" only in the pages that display blog entries? (i.e. prevent them to appear in static pages) Maybe showing them right below the list of entries in the blog? The purpose of this is keep a separation between regular pages and blog content, creating something like a "blog view" and a "static pages view". I hope it was clear enough. Thanks in advance =)
  • static pages are shown via static.tpl, normal entries via index.tpl just change static.tpl not to show those widgets, i.e. if static.tpl includes footer.tpl which contains {include file=widgets.tpl}, create a new staticfooter.tpl which won't include widgets.tpl and/or shows a different set of widgets; e.g. {widgets pos=staticpagewidgets}{/widgets} will show widgets from the group named "staticpagewidgets" (remember you have to call register_widgetset() from within theme.conf.php for each new set of widgets, or it won't show in your editor) PS: I know I'm not being very clear, since I've said so little; I hope someone will explain better what I mean, since I have little time :D this is old but quite relevant, it doesn't mention the register_widgetset() thing, but you can use the raw editor to accomplish the same result
  • Wow, no! It actually was perfectly clear! I just can't believe it was posible to accomplish without being hacky! You don't cease to amaze me! =D I'll post further if it gets messy, although i dont belive it will (will check for further responses though) Many, many thanks!
  • Well i actually envy your cleverness! It works perfectly. What i did: 1. Chnaged static.tpl: from {include file=widgets.tpl} to {include file=staticwidgetset.tpl} 2. Copy widgets.tpl to staticwidgetset.tpl and edit: from {widgets pos=left} to {widgets pos=staticwidgetset} 3. Add in config.php: register_widgetset('staticwidgetset'); 4. Populate staticwidgetsets in admin area -> widgets. Can't believe it took less than two minutes. You're amazing NWM =)
This discussion has been closed.
All Discussions
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