Loading...
 
Features / Usability

Features / Usability


Content Templates - A bug in tikineat style?

posts: 78 India

Using the tikineat style. TW v1.8.5.

When a content template is applied to a wiki page, after the page refreshes w/ the template content, the 'apply template' drop-down menu remains at whatever template was applied as opposed to changing to 'none'.

As a result of this, when the user makes any changes to the templated wiki page and saves it, all the changes are lost because the template is re-applied.

I didn't find this prob using moreneat style.

Can anyone confirm this?

posts: 47 France

Salut sirdhar !
Just making a diff between the moreneat specific template for edit wiki tiki-editpage.tpl with the default what uses tikineat you could try to change this default as following:
template/tiki-editpage.tpl
change around line 101 from:

Image
{tr}{$templates[ix].name}{/tr}

to

Image
{tr}{$templates[ix].name}{/tr}

Should do the job
à+


posts: 47 France

Ooops HTML tags !
template/tiki-editpage.tpl
change around line 101 from:

<option value="{$templatesix.templateId|escape}">{tr}{$templatesix.name}{/tr}</option>

to

<option value="{$templatesix.templateId|escape}" {if $templateId eq $templatesix.templateId}selected="selected"{/if}>{tr}{$templatesix.name}{/tr}</option>


posts: 47 France

I'm terribly sorry,
I mixed up everything
So
ALL MY POSTS HERE ARE ERRONOUS

WITHDRAW THEM PLEASE


posts: 47 France

Salut sirdhar !
Just making a diff between the moreneat specific template for edit wiki tiki-editpage.tpl with the default what uses tikineat,
you could try to change this default as following:
(attached is the change default template)
template/tiki-editpage.tpl
change around line 41 from:

<option value="{$templatesix.templateId|escape}" {if $templateId eq $templates[ix].templateId}selected="selected"{/if}>{tr}{$templates[ix].name}{/tr}</option>

to

<option value="{$templates[ix].templateId|escape}">{tr}{$templates[ix].name}{/tr}</option>

This morning I inversed the changes !
You should have wait my second coffee :-)
no pb

But note: just to be sure, I've rebuild an original 1.8.5
and I cannot reproduce this "bug" !!!
That should mean that that somewhere the templateId is assigned exclaim

à+

exclaim EVERY POST BEFORE IS ERRONEOUS ! exclaim


posts: 956

Hi:

This was previously reported at this forum, I think, or at tw users list in sf.net
Somebody reported that with a slight change to tiki-edit.php, I think, the error was corrected. I repeat, I think the simple solution was changing something at the php file, and not at tpl file.-
I can't find the post again (the search, though, doesn't seem to help much for two words boolean search....) sad