Loading...
Skip to main content
Home Page
About
Marketplace
Sample page
Wishlist at dev site
Sitemap (Categories)
Tiki Customization
Creating a theme
Converting a Bootstrap theme
Contributing, sharing or selling
Customizing icons
Tips
Template Tricks
CSS Tricks
Feature Examples
Articles
Blogs
Calendar
Forums
FAQs
Trackers
Files
Links Directory
Wiki Pages
Find
History: Blog layout
View published page
Source of version: 2
(current)
For Tiki 6, Tiki's blog section has been renovated, with many new features added and revisions made to existing features (see [http://dev.tiki.org/Blog revamp]). One part of this was to modify the way blog posts are displayed by the template (.tpl) files. The blog post template files (tiki-view_blog.tpl and tiki-view_blog_post.tpl) were edited to replace sections of code with a wrapper file (blog_wrapper.tpl) that in turn loads files containing the replaced code. This makes it easy for a theme designer to modify the layout of the blog post without disturbing the actual blog page code itself, simply by changing the order of the included files in blog_wrapper.tpl. !! Default wrapper file ([http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki/branches/6.x/templates/blog_wrapper.tpl|blog_wrapper.tpl]) The content of blog_wrapper.tpl is Smarty ''include'' statements for the following files, in this order (plus a filter to not show the navigation items when printed: * [http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki/branches/6.x/templates/blog_post_postbody_title.tpl|blog_post_postbody_title.tpl] * [http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki/branches/6.x/templates/blog_post_author_info.tpl|blog_post_author_info.tpl] * [http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki/branches/6.x/templates/blog_post_postbody_content.tpl|blog_post_postbody_content.tpl] * [http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki/branches/6.x/templates/blog_post_author_actions.tpl|blog_post_author_actions.tpl] * [http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki/branches/6.x/templates/blog_post_actions.tpl|blog_post_actions.tpl] * [http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki/branches/6.x/templates/blog_post_status.tpl|blog_post_status.tpl] * [http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki/branches/6.x/templates/blog_post_navigation.tpl|blog_post_navigation.tpl] This produces a display as follows (FiveAlive theme shown). {IMG(src="display114")}{IMG} In the image, the files the blog wrapper directly includes are in bold blue text. The relevant CSS classes are in red. !! Modifying the display By giving a theme its own blog_wrapper.tpl file (like templates/styles/my_new_theme/blog_wrapper.tpl) and then modifying it (changing the order of the included files, for example), the resulting blog post display can be changed easily and without bothering any functional code (which is contained in the included component files). (See [http://themes.tiki.org/Theme-specific templates] for general information about customizing template files for a theme.) !! Going a step further For a more radical layout change, any of the blog-related .tpl files can be modified for the theme. This new arrangement makes it easier to edit and maintain the custom file, since it is much smaller and more single-purpose than the old view-blog and view-blog-post templates that contained all the code for function and layout in those two files. Of course, any template customization makes maintaining the theme harder than if the theme uses CSS alone to get a distinct arrangement and appearance, but relying on CSS alone isn't always possible.
Layout
Stay on this page
Default
Single Container
Classic Bootstrap
Classic Tiki (3 containers - header, middle, footer)
Tikipedia
Latest Changes
Included themes
Bootstrap component sets
Materia
Ohia
Themes
Making or Updating a Theme for Tiki 27
Updating a Theme for Tiki 26
Tiki_org_family_customizations_CSS
BookStacked
Make an SCSS-Compiled Tiki Theme
...more
Subscribe to Tiki Newsletters!
Delivered fresh to your email inbox!
Don't miss major announcements and other big news!
Site Config
Site upgraded to branch 27x
Wed 24 of Apr, 2024 11:12 GMT-0000
Site upgraded to branch 26x
Wed 21 of Jun, 2023 09:45 GMT-0000
Site upgraded to branch 25x
Sat 12 of Nov, 2022 17:00 GMT-0000
Site upgraded to Tiki 23.x
Sat 24 of Jul, 2021 00:30 GMT-0000
Site upgraded to Tiki 20
Wed 29 of May, 2019 07:57 GMT-0000
We are now on Tiki 19.x
Fri 05 of Oct, 2018 10:02 GMT-0000
Shoutbox module removed
Thu 28 of Jun, 2018 07:01 GMT-0000
We are now on Tiki 18.x
Wed 02 of May, 2018 08:46 GMT-0000
Upgraded to Tiki 17.0
Wed 02 of Aug, 2017 08:19 GMT-0000