Jump to content

Strip tags in homefeatured


Recommended Posts

  • 1 month later...
Can someone help him because NOBODY knows THE FUCKING SOLUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Well, you can recode so it doesn't strip the tags or another way of doing it is to use jQuery to replace a text string like '#break#' with an html line break '
' . So wherever you insert that text string a line break will occur. It is a hacky hack but it works.
Link to comment
Share on other sites

As an different example (shouldn't be too hard to transfer it to home featured) --- in editorial.tpl if you use the code below it will insert a line break wherever you insert a "|" in the text. So,

the quick red |dog

will be rendered on the page as

the quick red

dog



{*
* 2007-2010 PrestaShop 
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author Prestashop SA 
*  @copyright  2007-2010 Prestashop SA
*  @version  Release: $Revision: 1.4 $
*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
*  International Registred Trademark & Property of PrestaShop SA
*}

<!-- Module Editorial -->

   {if $editorial->body_home_logo_link}body_home_logo_link|escape:'htmlall':'UTF-8'}" title="{$editorial->body_title|escape:'htmlall':'UTF-8'|stripslashes}">{/if}
   {if $homepage_logo}getMediaLink($image_path)}" alt="{$editorial->body_title|escape:'htmlall':'UTF-8'|stripslashes}" {if $image_width}width="{$image_width}"{/if} {if $image_height}height="{$image_height}" {/if}/>{/if}
   {if $editorial->body_home_logo_link}{/if}
   {if $editorial->body_logo_subheading}{$editorial->body_logo_subheading|stripslashes}
   {elseif $editorial->body_logo_subheading}{$editorial->body_logo_subheading}{/if} 
   {if $editorial->body_title}
         {assign var="nstring" value=$editorial->body_title|stripslashes}
         {assign var="nsplit" value="|"|explode:$nstring}
         {foreach from=$nsplit item=foo}
             {$foo}

         {/foreach}
   {elseif $editorial->body_title}
         {assign var="nstring" value=$editorial->body_title|stripslashes}
         {assign var="nsplit" value="|"|explode:$nstring}
         {foreach from=$nsplit item=foo}
             {$foo}

         {/foreach}
       {/if}
   {if $editorial->body_subheading}{$editorial->body_subheading|stripslashes}
   {elseif $editorial->body_subheading}{$editorial->body_subheading|stripslashes}{/if}
   {if $editorial->body_paragraph}{$editorial->body_paragraph|stripslashes}
   {elseif $editorial->body_paragraph}{$editorial->body_paragraph|stripslashes}{/if}

<!-- /Module Editorial -->

Link to comment
Share on other sites

@Angora,

That covers the validation. But what about the output?

{$product.description_short|strip_tags|truncate:130:'...'}


Surely the smarty needs to be adjusted too? I am just learning my way around Presta so may be wrong?!?

Link to comment
Share on other sites

×
×
  • Create New...