Many Blank Templates Appear In Template List
This bug is fixed !

Description

When using templates on your site (pages with template category), creating a new page presents the "Initial template" dropdown box with each template followed by "no template (blank page)". This is ugly and a little confusing.

How to Reproduce

just create a page and use the template selector.

Browsers

all

Has bug

Works correctly

Workarounds

none

FIX!!

thanks to andrewescott
Looking in the source code for Wikidot v1, the problem seems to be in the file /templates/modules/edit/PageEditModule.tpl

<select name="theme" id="page-templates" onchange="WIKIDOT.modules.PageEditModule.listeners.templateChange(event)">
  {foreach from=$templates item=template}
    <option value=""  style="padding: 0 1em">no template (blank page)</option>
    <option value="{$template->getPageId()}"  style="padding: 0 1em" 
      {if $template->getPageId() == $templateId}selected="selected"{/if}>{$template->getTitle()|escape}</option>
  {/foreach}
</select>

It seems clear that the "no template (blank page)" option is repeated for each template in the list. The solution ought to then be to move the "no template (blank page)" option to above the foreach loop.

Contact

Rate this Bug

Rate the urgency of this bug. If you think it is more urgent and important than it's current rating suggests, rate it up.

rating: +3+x

Comments

Working on it
GabrysGabrys 1209753915|%e %b %Y, %H:%M %Z|agohover

Michal's already have this patch on his TODO.

unfold Working on it by GabrysGabrys, 1209753915|%e %b %Y, %H:%M %Z|agohover
GabrysGabrys 1210616768|%e %b %Y, %H:%M %Z|agohover

FIXED!

unfold by GabrysGabrys, 1210616768|%e %b %Y, %H:%M %Z|agohover
Re:
Phil ChettPhil Chett 1210618349|%e %b %Y, %H:%M %Z|agohover

Thank you guys. That make things so much easier and clearer.
SuperSmileys_100.gif

unfold Re: by Phil ChettPhil Chett, 1210618349|%e %b %Y, %H:%M %Z|agohover
Add a new comment
page tags: fixed template
page_revision: 8, last_edited: 1210750392|%e %b %Y, %H:%M %Z (%O ago)
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.