Loading...
 
Features / Usability

Features / Usability


Content Templates question

posts: 28 United States

Just starting using Tiki as an experiment for my departmental workgroup and one of the things I've been wrestling with are the content templates.

I've been able to engage them, however I have two questions I can't seem to find answers on:

  • Can I, by default, apply a template to all pages or to given categories without the user having to manually select it?
  • More importantly, can I define an area within the template where the user can edit text? Kind of like a {textarea} tag of some sort, so that I can clearly define a top (such as with a bar, ToC, hardline), let the user write their content (headings, tables, lists, etc), and wrap up the page with a clearly defined bottom (such as a bar, intellectual property notice - not the CMS, other links, etc).


So far the content templates are pretty nice and do nearly what I want. I haven't yet decided on whether I want standardized footers, but if I did, allowing a {textarea} kind of thing would make these truly powerful templates. If something like that already exists, even better!

Kerrnel

posts: 4656 Japan

> *Can I, by default, apply a template to all pages or to given categories without the user having to manually select it?

As far as I know, that isn't possible in an unmodified Tiki.

> *More importantly, can I define an area within the template where the user can edit text? Kind of like a {textarea} tag of some sort, so that I can clearly define a top (such as with a bar, ToC, hardline), let the user write their content (headings, tables, lists, etc), and wrap up the page with a clearly defined bottom (such as a bar, intellectual property notice - not the CMS, other links, etc).

I think I read that in a coming version of Tiki there will be page section editing, which might provide the functionality you're looking for, especially if the sections can have different edit permissions. But I don't know when that'll be released or how it'll work exactly.

In the meantime, I don't think there is an easy way to put editable areas in templates.

I did one Tiki site that had some wiki pages whose content was actually two or three other included (using the INCLUDE wikiplugin) wiki pages. Only admin had edit rights for the final ("composite") page. The middle section of the page was another page, pulled in with the include plugin, and there was an edit link that pointed to that page's editpage. Normal registered users could edit this included page (thus, in effect, the middle section of the composite page). Normally when an edit is submitted, that page itself displays of course. To have the composite page display instead (with the newly-edited middle section), the site's .htaccess file contained Apache URL rewrite statements.

Very kludgey and complicated, it worked, but I don't recommend it. wink

> So far the content templates are pretty nice and do nearly what I want. I haven't yet decided on whether I want standardized footers, but if I did, allowing a {textarea} kind of thing would make these truly powerful templates. If something like that already exists, even better!

You might also look at Dynamic Variables. This feature lets you specify text that, when clicked by a group with appropriate permission, is editable in place. Maybe you can use this somehow.

-- Gary

posts: 28 United States

> > *Can I, by default, apply a template to all pages or to given categories without the user having to manually select it?
>
> As far as I know, that isn't possible in an unmodified Tiki.

I think I saw reference to it somewhere on here as far as the Dev went so thought I'd ask. I don't plan on changing things willy nilly, so it's not that big a deal. (Famous last words...)

> > *More importantly, can I define an area within the template where the user can edit text? Kind of like a {textarea} tag of
>
> I think I read that in a coming version of Tiki there will be page section editing, which might provide the functionality you're looking for, especially if the sections can have different edit permissions. But I don't know when that'll be released or how it'll work exactly.
>
> In the meantime, I don't think there is an easy way to put editable areas in templates.
> ...
> You might also look at Dynamic Variables. This feature lets you specify text that, when clicked by a group with appropriate permission, is editable in place. Maybe you can use this somehow.

Sounds interesting, but also not quite what I'm looking for. As enthusiastic as I am about revamping the site, I want little or nothing to do with upkeep once its running aside from major stuff. Niggly things like that would drive me nuts. Thanks for the suggestion though! biggrin

Kerrnel


posts: 113 Ireland

What about editing tiki-show_page.tpl and put the top code directly there. If you put the code before the {$parsed}, then it will be processed at the top of the page. And if you put code right after, you would get a bottom. And no one can edit it. You wouldn't see it when editing pages unless you put it in that template too.

This would require it to be the same for every single wiki page.

You could also use tiki-bot_bar.tpl for any footer that would be for the whole site.

Just a thought.

Gary