Jump to content

xhtml validation


Recommended Posts

So on a fresh install of PrestaShop, it will not validate html, because of code in modules/blockcategories. In fixing this issue, I also noticed that themes/prestashop/category-tree-branch.tpl is not being used, because it is in the wrong location.

To fix the first issue, modify modules/blockcategories/blockcategories.tpl as follows..

move

    {* Javascript moved here to fix bug #PSCFI-151 *}
       [removed]
       // <![CDATA[
           // we hide the tree only if JavaScript is activated
           $('div#categories_block_left ul.dhtml').hide();
       // ]]>
       [removed]



below the

line. So the code now looks like
<!-- Block categories module -->

{l s='Categories' mod='blockcategories'}

       {* Javascript moved here to fix bug #PSCFI-151 *}
       [removed]
       // <![CDATA[
           // we hide the tree only if JavaScript is activated
           $('div#categories_block_left ul.dhtml').hide();
       // ]]>
       [removed]

       {foreach from=$blockCategTree.children item=child name=blockCategTree}
           {if $smarty.foreach.blockCategTree.last}
               {include file="$branche_tpl_path" node=$child last='true'}
           {else}
               {include file="$branche_tpl_path" node=$child}
           {/if}
       {/foreach}



<!-- /Block categories module -->



also, just to pretty up the code a little, modify modules/blockcategories/category-tree-branch.tpl as follows..


{$node.name|escape:html:'UTF-8'}



by changing where the spaces are in both if statements, it takes a couple blank spaces out of the final code...

As for the themes category-tree-branch.tpl not working, it needs to be in themes/prestashop/modules/blockcategories/category-tree-branch.tpl, as per the code in modules/blockcategories/blockcategories.php on line 192

edit: I love that even putting code inside a 'code' block, it still edits out import info, oh well, I tried, and hopefully you can figure out what Im saying...

edit2: Well, I tried moving themes/prestashop/category-tree-branch.tpl into themes/prestashop/modules/blockcategories, and it didn't seem to work either, so I dunno what the issue there is, I'll get back to ya on that one.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...