Jump to content

Show more link in subcategory description?


Recommended Posts

On my webshop there is dublicate content on my main category page and subcategory page. How can i show a shortened text on the main category page with some kind of "show more" link that sends the visitor to the subcategory page?

 

This is one of my main category pages:

Maend

 

 

 

Thanks in advance.

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

Anyone?

I think the theme which you use remove the more tag,

{if $category->description}

You can find your description blog in theme\mythemes\category.tpl

 

and then put this code

{if $category->description}
   <div class="cat_desc">
   {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}
   </div>
  {/if}

 

and split the text how much text you want to split with more text. Hope this will solve , what you like.

Link to comment
Share on other sites

×
×
  • Create New...