Category Descriptions for Multicolumns

Anyone have any ideas how to correctly pass the Category Description to the following file:



/views/categories/components/categories_multicolumns.tpl



i currently modified this file with the following code which all works apart fromt he categories description


{foreach from=$categories item=category name="categories"}<br />
    <div class="fatsoCategories"><br />
        <h2><a href="{"categories.view?category_id=`$category.category_id`"|fn_url}" title="{$category.category}">{$category.category}</a></h2><br />
        <a href="{"categories.view?category_id=`$category.category_id`"|fn_url}" title="{$category.category}">{include file="common_templates/image.tpl" show_detailed_link=false object_type="category" images=$category.main_pair no_ids=true show_thumbnail="Y" image_width=$settings.Thumbnails.category_lists_thumbnail_width image_height=$settings.Thumbnails.category_lists_thumbnail_height}</a><br />
        {$category.description}<br />
    </div><br />
{/foreach}<br />
<br />
{capture name="mainbox_title"}{$title|default:$lang.categories}{/capture}
```<br />
<br />
If anyone has any ideas, kindly let me know as i cannot seem to drag it in to the component

[quote name=‘1line’]Anyone have any ideas how to correctly pass the Category Description to the following file:



/views/categories/components/categories_multicolumns.tpl



i currently modified this file with the following code which all works apart fromt he categories description


{foreach from=$categories item=category name="categories"}


{/foreach}

{capture name="mainbox_title"}{$title|default:$lang.categories}{/capture}




If anyone has any ideas, kindly let me know as i cannot seem to drag it in to the component[/QUOTE]



Here’s a quick addon I made for free:

CS-Cart 2.0.13-2.1.0 Category Descriptions in Catalog Addon



Enjoy!

that is what i need yes but its built for categories list no? im currently using the block on the homepage for categories multicolumns… is there anyway to apply it to this? i trie to base a addon using your code but not sure how you override the view components / view categories templates

Look at the addon. You’ll see the location:



/var/skins_repository/base/customer/addons/category_descriptions/



Inside you see my template hooks directory:

/hooks/



And the hook I’m overriding is “categories:catalog”

/categories/catalog.override.tpl



So you’d need to find a hook in the template to override. Then add it to the “hooks” directory in the correct format. So if the hook is catalog:listing you want to create a catalog directory with a template in it for listing.override.tpl. That template should be a copy of the existing one with any changes you wish to make.



The descriptions, because of the addon, will still be available on the page.

i’m also looking for the similar solution

but the link isnt working

my home page have list of categories, i want description to appear along with it

The links been removed,

I need something similar.

Need to make my own custom Categories template for displaying Cats in the Cats Block.

I thought you could just create a new /views/categories/components/categories_multicolumns_xxx.tpl file from refer to it in a new /blocks/categories_multicolumns_xx.tpl file and give its a new

{** block-description:multicolumns_xxx **}



But I cant get the new template to show up in the “Apearance type.” dropdown .



Wouldnt need hooks if creating an additional .tpl ??

Ok I intend starting a new topic more focused on

“How to create new Appearence Type and Wrapper templates”



We need to be able to create new Appearence Type and Wrapper templates for the Blocks, in particular, Categories Blocks.

The new Appearence Type and Wrapper templates MUST be selectable from within the Edit Block>> Appearence Type and Wrapper selection boxes.



Before I start this new topic, does anyone know of a guide or document relating to this. ??

You might go look at one of the last segments of the tutorial I wrote about creating an addon in the Developers section of the forum. I think it discusses where to add file for them to show in the Block contents. You can look at other blocks to see where appearance types are specified.

[quote name='tbirnseth' timestamp='1308028399' post='114947']

You might go look at one of the last segments of the tutorial I wrote about creating an addon in the Developers section of the forum. …

[/quote]

Thanks for that, I could not find your tute' but found this :

Customising 'Specific Settings' of an Appearance Type - Store Design & Templates - CS-Cart Community Forums



Briefly, I created new Appearance type , using my example of categories_multicolumns_box.tpl

These are the files that need to be created or modified :

  1. Create: //customer/blocks/categories_multicolumns_box.tpl

{** block-description:multicolumn_box **}
{include file="views/categories/components/categories_multicolumn_box.tpl" ..........




2. Create: //views/categories/components/categories_multicolumn_box.tpl

This where the look of the Appearance type is described.



3.Add code (in the correct location of course) /Applications/MAMP/htdocs/3G/schemas/block_manager/structure.php

// add these lines to make categories_multicolumns_box.tpl work
'blocks/categories_multicolumns_box.tpl' => array (
'params' => array (
'get_images' => true
)
),


4.Add code (in the correct location of course) /Applications/MAMP/htdocs/3G/schemas/block_manager/specific_settings.php

// remoteONE mod to make categories_multicolumns_box.tpl work
'blocks/categories_multicolumns_box.tpl' => array (
'number_of_columns' => array (
'type' => 'input',
'default_value' => 2
)
),




5. Add language variable [multicolumn_box] to have the drop-down show a label “Multicolumn box” for the template rather than the template name.



That seems to be working,