Loading...
 
Themes

Themes


overriding default templates by chosen styles not working

Austria

it says in the
wikidok
(scroll down to: "overriding templates") that i should just save EDITED templates in the folder of the chosen stylesheet
i.e. templates/styles/MYSTYLE/

then it would override the default templates in:
/templates

at least with my tiki (1.8.5.) it doesn´t.

as i manually edited and saved via ftp, i also tried via the "edit templates" function in the admin-menu,
but even there i only get to edit and save the .tpl-files from the /templates-directory

so i am a little confused.

- is the promise of overriding" in the wikidok wrong?
- is there any other setting i did not consider that prevents my stlye-templates from "overriding" (the styles is chose in the general-preferences (tiki-admin.php?page=general) so i think that would suffice to also consider the templates of the chosen style...

how can i make tiki to consider my edited templates without having to change the default settings (which then apply to ALL styles)?

thanks for any suggestions!


> how can i make tiki to consider my edited templates without having to change the default settings (which then apply to ALL styles)?
Create a style. For instance if tikineat is your favorite style,
copy styles/tikineat.css styles/my_style.css
mkdir templates/my_style
For each template you want to change, copy the templates to this directory and change it in this directory
cp templates/xxx.tpl templates/styles/xxx.tpl

Then select the style my_style on your site (admin->general) or change pref or switch theme module

Sometimes, some cache can interfer, better to clean the cache admin->system admin the 3 directories

sylvie


Austria


the bitter truth was:

the user i was using as admin was still set on another .css.

so i COULD indeed not see the changes that were already affecting the layout for all other (not-logged-in = anonymous) users.

>;e)

ps. actually i was surprised that my templates seem to reload their new status immediately. i barely had to clear the cache.



> it says in the
> wikidok
(scroll down to: "overriding templates") that i should just save EDITED templates in the folder of the chosen stylesheet
> i.e. templates/styles/MYSTYLE/
>
> then it would override the default templates in:
> /templates
>
> at least with my tiki (1.8.5.) it doesn´t.

I am having the exact same problem with 1.9.2. I have created a new theme and the css file works fine; I have created /templates/styles/$theme_name and in there I have placed an edited tiki-view_articles.tpl in that directory. No matter what I do, TikiWiki will not pick up the edited .tpl file - any .tpl file - that I place in that directory.

The directory and file permissions are exactly the same as the other /templates/styles/ themedirs. I've tried clearing the cache. I've tried swapping themes back and forth, logging out and logging back in. I've set the theme in the Admin menu and through the switch_theme module.

If I upload the exact same edited tiki-view_articles.tpl file to any other (pre-existing) themedir, TikiWiki picks it up just fine. I've tried deleting and recreating the custom template/styles dir, to no avail.

Does anyone know what's going on here?



This patch has fixed the bug, as well as adding some nice new functionality. Thank you.

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting