hi,
please help me for show category tree....
i want show category and subcategory and sub-subcategory
for example:
cat 1
cat 2
sub cat 1
sub cat 2
cat 3
sub cat 1
sub cat 2
sub-sub cat 1
sub-sub cat 2
cat 4
i want show in
- and design is over. But I don't know what code should take to display it:
With the following code, I could only display the category without its subcategories:
{assign var="all_categories" value=0|fn_get_plain_categories_tree:false}
please help me.
{assign var="all_categories" value=0|fn_get_plain_categories_tree:false}
excuse me a right code:
{assign var="all_categories" value=0|fn_get_plain_categories_tree:false}
excuse me a right code:
{assign var="all_categories" value=0|fn_get_plain_categories_tree:false}
please help meeee.... pleaseeeeee
I think, you should not use plain tree here if you want to put subcategories to individual ul containers
I think, you should not use plain tree here if you want to put subcategories to individual ul containers
Can you please guide me what can I use instead? thank you
Can you please guide me what can I use instead? thank you
I want to show the categories as follows:
- All category
- cat 1
- cat 2
- cat 3
Try something like
{$categories = []|fn_get_categories_tree}
{foreach from=$categories item=cat1}
-
{$cat1.category}
{if $cat1.subcategories}
{foreach from=$cat1.subcategories item=cat2}
-
{$cat2.category}
{if $cat2.subcategories}
{foreach from=$cat2.subcategories item=cat3}
-
{$cat3.category}
{foreach}
{/if}
{foreach}
{/if}
{/foreach}
(!) Not tested
Try something like
{$categories = []|fn_get_categories_tree}
{foreach from=$categories item=cat1}
-
{$cat1.category}
{if $cat1.subcategories}
{foreach from=$cat1.subcategories item=cat2}
-
{$cat2.category}
{if $cat2.subcategories}
{foreach from=$cat2.subcategories item=cat3}
-
{$cat3.category}
{foreach}
{/if}
{foreach}
{/if}
{/foreach}
(!) Not tested
Hello. I really reallyyy thank you. I don't know how to appreciate you!
Please answer another question, thank you.
I find the code for the category ID:
{$cat1.category_id}
But I don't know what code to use to get the category link!
I also used the following code to display categories images but it didn't work!
{include file="common/image.tpl"
show_detailed_link=false
images=$cat1.category_id
no_ids=true
image_id="category_image"
image_width=32
image_height=28
}
Hello. I really reallyyy thank you. I don't know how to appreciate you!
Please answer another question, thank you.
I find the code for the category ID:
{$cat1.category_id}
But I don't know what code to use to get the category link!
I also used the following code to display categories images but it didn't work!
{include file="common/image.tpl"
show_detailed_link=false
images=$cat1.category_id
no_ids=true
image_id="category_image"
image_width=32
image_height=28
}
my friends for display category image i use code:
{$main_pair = $cat1.category_id|fn_get_image_pairs:'category':'M':true:true}
{include file=“common/image.tpl”
show_detailed_link=false
images=$main_pair
no_ids=true
image_id=$cat1.category_id
image_width=32
}
but not found code for category url