Installing template failed (solved)

thombaker

Thanks very much, Ruud, for your explanations :-)

Ruud

Obviously the $template_directory will reflect the directory name where the template will be installed.
A good explanation on how to create an install package for templates is found here in the WB help pages.

Overwriting existing templates can be done, but you will need to use the version variable in a correct way.
The ALLCSS template has a default version of 2.6. Setting it to 2.7 or 3.0 will overwrite the old version.
When the version was not changed, the installer will not install. (it is already there)

The info.php is a piece of PHP code. It must follow the standard PHP rules on single and double quotes.
If you want a single quote in your template description (or name), just create the string within double quotes.
$template_description = "The best Template  >i've<  ever made."; would have worked fine.

Happy Baking to you too..
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

thombaker

Hi to all people here.
This is my first post here and first i want say
WB is a very great cms among so much others i've tested...
But... i got some trouble with installing templates.
First i try installing a modified copy of "allcss" with wb/addons/templates
Result was my template didn't appear in the template lists.
The reason was 2 mistakes i've made.

1. The value of the variable $template_directory in info.php of a template must
    match the directory name where the templates files resides. In other words:
    If you want change the dir. name you must change the value of $template_directory,
    otherwise template install will fail but without an visible errormessage. :|
2. Another pretty mistake i've made was an double single quote in the info.php:
    $template_description = 'The best Template  >i''ve<  ever made.' :roll:
    result: No installation of my template and the template lists in the backend
    were suddenly shorter!! :-o and all without errormessages :roll:
But no reason for panic, after fix my typos all imported templates appears again and my
template too. (without errors :-D)
I hope i can help to save some time finding errors :-)

Happy baking to all