Many blank templates appear in template list
Forum » Wikidot features and bugs / Bugs and problems » Many blank templates appear in template list
Started by: andrewescottandrewescott
On: 1205321249|%e %b %Y, %H:%M %Z|agohover
Number of posts: 6
rss icon RSS: New posts
Summary:
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.
Many blank templates appear in template list
andrewescottandrewescott 1205321249|%e %b %Y, %H:%M %Z|agohover

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.

This is well illustrated on the sandbox wiki as it has quite a few templates. To see, create a new page such as
http://sandbox.wikidot.com/frodo
and view the "Initial template" dropdown box. About ten of the entries are currently "no template (blank page)".

This has been tested on Firefox 2 as well as IE 7 on Windows XP.

unfold Many blank templates appear in template list by andrewescottandrewescott, 1205321249|%e %b %Y, %H:%M %Z|agohover
Re: Many blank templates appear in template list
andrewescottandrewescott 1205926187|%e %b %Y, %H:%M %Z|agohover

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.
unfold Re: Many blank templates appear in template list by andrewescottandrewescott, 1205926187|%e %b %Y, %H:%M %Z|agohover
Re: Many blank templates appear in template list
tadhgktadhgk 1206812943|%e %b %Y, %H:%M %Z|agohover

I've had the same problem. Is this due to be fixed soon?

unfold Re: Many blank templates appear in template list by tadhgktadhgk, 1206812943|%e %b %Y, %H:%M %Z|agohover
Re: Many blank templates appear in template list
ErichSteinboeckErichSteinboeck 1209636373|%e %b %Y, %H:%M %Z|agohover

According to the latest commit info, Michal seems to be in the process of fixing this.

Revision: 70
Date: 4/30/08 11:20 PM
User: michal_frackowiak
Message: * Fixed a but that resulted in displaying multiple "no template" option when editing new pages.

The fix though doesn't seem to have gone live yet — when I try it, I still see those several "No template (blank page)" entries.

unfold Re: Many blank templates appear in template list by ErichSteinboeckErichSteinboeck, 1209636373|%e %b %Y, %H:%M %Z|agohover
Re: Many blank templates appear in template list
ErichSteinboeckErichSteinboeck 1210621337|%e %b %Y, %H:%M %Z|agohover

Fixed — see http://community.wikidot.com/forum/t-57022#post-162282

last edited on 1210621354|%e %b %Y, %H:%M %Z|agohover by ErichSteinboeck + show more
unfold Re: Many blank templates appear in template list by ErichSteinboeckErichSteinboeck, 1210621337|%e %b %Y, %H:%M %Z|agohover
Re: Many blank templates appear in template list
andrewescottandrewescott 1213706010|%e %b %Y, %H:%M %Z|agohover

Thanks!

unfold Re: Many blank templates appear in template list by andrewescottandrewescott, 1213706010|%e %b %Y, %H:%M %Z|agohover
New post

Bookmark and Share

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.