Jump to content

[solved] Remove "more" in category


Recommended Posts

you should check the category.tpl file located in the template directory

 

there is something like:

{if strlen($category->description) > 120}
<p id="category_description_short">{$category->description|truncate:120}</p>
<p id="category_description_full" style="display:none">{$category->description}</p>
<a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a>
{else}
<p>{$category->description}</p>
{/if}

 

instead this code (above), put there just:

<p id="category_description_full" style="display:none">{$category->description}</p>

  • Like 1
Link to comment
Share on other sites

you should check the category.tpl file located in the template directory

 

there is something like:

{if strlen($category->description) > 120}
<p id="category_description_short">{$category->description|truncate:120}</p>
<p id="category_description_full" style="display:none">{$category->description}</p>
<a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a>
{else}
<p>{$category->description}</p>
{/if}

 

instead this code (above), put there just:

<p id="category_description_full" style="display:none">{$category->description}</p>

 

What I have in my code is this:

{if $category->description}

{if strlen($category->description) > 300}

<p class="cat_desc bordercolor bgcolor" id="category_description_short">{$category->description|truncate:300} <a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a></p>

<p class="cat_desc bordercolor bgcolor" id="category_description_full" style="display:none">{$category->description}</p>

{else}

<p class="cat_desc bordercolor bgcolor">{$category->description}</p>

{/if}

{/if}

{if isset($subcategories)}

Link to comment
Share on other sites

hello

it's because you probably removed also the last line:

{if isset($subcategories)}

 

this line is necessary, dont remove it

 

remove only this:

{if $category->description}
{if strlen($category->description) > 300}
<p class="cat_desc bordercolor bgcolor" id="category_description_short">{$category->description|truncate:300} <a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a></p>
<p class="cat_desc bordercolor bgcolor" id="category_description_full" style="display:none">{$category->description}</p>
{else}
<p class="cat_desc bordercolor bgcolor">{$category->description}</p>
{/if}
{/if}

Link to comment
Share on other sites

hello

it's because you probably removed also the last line:

{if isset($subcategories)}

 

this line is necessary, dont remove it

 

remove only this:

{if $category->description}
{if strlen($category->description) > 300}
<p class="cat_desc bordercolor bgcolor" id="category_description_short">{$category->description|truncate:300} <a href="#" onclick="$('#category_description_short').hide(); $('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}</a></p>
<p class="cat_desc bordercolor bgcolor" id="category_description_full" style="display:none">{$category->description}</p>
{else}
<p class="cat_desc bordercolor bgcolor">{$category->description}</p>
{/if}
{/if}

Then everything disapear, Maybe I explain bad.

I have a description text there, look at the link:

http://www.hairofbeauty.com/hair-extensions/sv/3-clip-in-hair

I dont want to have the expand function there, I want it to be open always.

Link to comment
Share on other sites

hello

that's right because there is "display:none" - i modified the code, try with this one, should help

so instead the whole code that i mentioned before, use this:

 

<p class="cat_desc bordercolor bgcolor" id="category_description_full">{$category->description}</p>

Link to comment
Share on other sites

hello

that's right because there is "display:none" - i modified the code, try with this one, should help

so instead the whole code that i mentioned before, use this:

 

<p class="cat_desc bordercolor bgcolor" id="category_description_full">{$category->description}</p>

Mucho Grazie Senor ;-)

It works.

Link to comment
Share on other sites

Hey guys,

why so complicated? Just change

 

<p class="cat_desc bordercolor bgcolor" id="category_description_short">{$category->description|truncate:300}
 <a href="#" onclick="$('#category_description_short').hide();
$('#category_description_full').show(); $(this).hide(); return false;" class="lnk_more">{l s='More'}
</a></p>

 

by removing the link and the truncate-statement to:

<p class="cat_desc bordercolor bgcolor" id="category_description_short">{$category->description}</p>

 

This should work.

Edited by eleazar (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...