Loading...
 
Skip to main content

Tiki Design


Overview of templates for creating an own theme

posts: 10 Germany

Hi,

I would like to have an overview of all templates which "belongs to" one feature / area.

On Tikiwiki2_CSS_selectors I now find the great listing of a the CSS selectors used in TikiWiki. But in some cases I have difficulties to understand, what part they do affect - and so I tried to find the according template to get an idea of what section is meant.

I have in mind a listing like this:

Forums:

  • comment-body.tpl
  • comment-header.tpl
  • comment.tpl
  • ...


Does such a list just exist?

Thank you for help!

Rontu

posts: 254 Japan

Sorry, no list like that exists, as far as I know. When I've needed to, I've looked through the templates to find how they fit together, starting with, for example, tiki-view_forum_thread.tpl and searching through it to find other .tpl files that are included.

But for most things related to CSS it isn't necessary to know which template is involved. After all, when one template file includes another one, they essentially become one block of code. If you need to change the layout, more than CSS can manage, then it's necessary to modify the template and so of course you need to find out which one, and where.

These things are really in flux these days. Well, branch 2.0 is pretty stable, but trunk (which will be Tiki 3) is getting lots of changes that would make it hard to keep a list up to date.

-- Gary


posts: 10 Germany

Thank you for your answer, Gary!

Just one general question about the future of the TikiWiki themes:

I'm using olive on my old, and default2 on my new Tiki, so both old, table based themes, and would really like to keep them for my sites.

Could you encourage me, that if I will manage it, to customize the particular CSS files for this two themes - certainly adapting my changes according to what is mentioned under /styles/transitions/ and regarding the naming of all actual CSS selectors on Tikiwiki2_CSS_selectors - I will be able to keep this two themes?

I mean, will the arrangements of the elements, which are defined in the templates (if I understand it right) furthermore support the table based layout, that is needed for those themes?

posts: 254 Japan

Those themes use the old table-based layout. Tiki 2 (all releases) also use this layout, for themes other than Feb12, Darkroom, The News, and Tikinewt. But the plan is to switch to a floating divs type of layout in Tiki 3. There will have to be some kind of migration path for themes (stylesheets) that expect to find the old tiki.tpl and its layout table. (Some of the new themes use a table also, but not ones with the same details as those of the old themes.)

There are a couple of ways the migration can be done. One is to add a tiki.tpl to, for example, templates/styles/olive/ so that the stylesheet continues to find the table that it's expecting.

The trouble with this is that then you have another file to maintain, and change whenever new things are added to the default tiki.tpl, etc. Also, the theme continues to have an old type of construction.

The other path is to convert the olive and default2 (and other old themes) to use the modern templates. I think this is a better solution. Basically, these are the differences with the new layout method:

  • Floating divs instead of table for main layout (in tiki.tpl)
  • Font sizes are specified by % and ems rather than px.


Actually, I did a Damian theme version that uses the *litecss layout method. It has a small damian.css file that imports tikinewt.css to get support for the new layout method and font sizes, etc. Then damian2.css adds its own style properties for things that are unique to the theme. I think this might be a good method for other people using older themes, so I'll refine it and put up some documentation. (Go to http://zukakakina.com/tiki-index.php and switch theme to Damian to see how it looks. It's not a complete emulation, but you get the idea.)

-- Gary


posts: 10 Germany

Thank you very very much for your detailled answer, Gary ❗

Now I understand much better, what the ideas for the coming vs 3 are (regarding the themes). And the two main differences you mentioned sounds very good, as on my own sites I decided myself, too, to use floating divs and relative font sizes for more comfort of visitors with different monitors, resolutions etc.

So now knowing, that I haven't to be fixed in mind on the old table layout to keep the "general look" of themes like olive or default, I can yet return to simply enjoy "my" Tiki 😀

Thanks a lot!

Rontu