[Solved] Content appear in all subcategories ?

More
14 years 3 months ago #8261 by ranm
Hi,

I'm trying to make use of the new 1.5.3 option to display subcategory content.
Problem is : my code seems to display all category & sub-category content, regardless of where it is.

The code :
Code:
<div class="subcategorieslist"> <?php foreach ($this->categories as $sub) : ?> <h3><?php echo $this->escape($sub->title); ?></h3> <?php foreach ($sub->items as $item) : ?> <?php echo $this->escape($item->title); ?><br /> <?php endforeach; endforeach; ?> </div>

Displays :

SubCategory 1
Content 1
Content 2
Content 3

SubCategory 2
Content 1
Content 2
Content 3

(Content 1 is in Subcategory 1, Content 2 and 3 are in Subcategory 2).

Any idea what went wrong ?

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #8368 by micker
hello in last version it's works more simply
created this
categorie A
|_categorie1
|_item1
|_item2
|_item3
|_categorie2
|_item1
|_item2
|_item3
in your menu create a link to categorie A end use develloppe subcategorie in right panel
That it ?
Regards

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #9018 by ranm
Well, when you say "in your menu", where exactly ?

I have selected "Afficher les sous-catégories : oui" (wich seems to be the french equivalent of "developp subcateries").
But I still don't see this result (Yes, what you are describing is exactly what i'm looking for).
It still displays "Subcategory xxxx [6]" and then the content of the main category only.

Could that be a template problem ?
Like my template is still the old one, even after I have installed the new version of Flexicontent ?

I'm lost...

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #9035 by ranm
AAaaah, i'm getting mad.

I have tried on a clean install, and all I get is
"Sous catégories : Métiers médico-techniques (6/0)"
and then the content of my main category.

Why is everybody else those 6 subcategory content displayed and not me ??

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #9037 by yopyop001
Hi,

May be this post can help you to display what you want:
www.flexicontent.org/forum/index.php?t=1306&rb_v=viewtopic


I tried your code in the file category_subcategories.php and it works.
But in the category parameters, you have to put 'No' to the parameter 'Display Subcategories' And yes to 'Subcategories'.

And if you want to make link to your items, you can use :
Code:
[url=<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($item->slug, $sub->slug)); ?>]<?php echo $this->escape($item->title); ?>[/url]


I hope it will help you.

Rgds

Please Log in or Create an account to join the conversation.

More
14 years 3 months ago #9087 by ranm
Great !
Thanks for your test : since my first message I had been working on this code - knowing that it was functionnal with the configuration you described helped me a lot.
Solved :)

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.470 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline