Split/Break after each Category in Categories view

More
9 years 9 months ago #51960 by Espi87
Hi Friends,

i think this is not a templating Problem but.

I just Need a break between each Category in categories view...

Following Situation:

Articles in Categories
- Contact
- - Offices
Articles: A1, A2, A3, A4, A5
- - Factories
Articles: B1, B2, B3
- - etc.
Articles: C1, C2, C3, C4

Target:
If you Enter Page you are only able so see 2 Filter Fields
"Filter by: Country, Category"
... nothing should be shown, but the Filter - DONE

When you Filtered it should be shown in 3 columns with a break after each Category... like this:

A1 A2 A3
A4 A5
B1 B2 B3
C1 C2 C3
C4

But i dont know how to handle it... it will always Show like this:

A1 A2 A3
A4 A5 B1
B2 B3 C1
C2 C3 C4

:oops:
Please Help... and sorry for maybe bad english.

Best regards
EsPi

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

More
9 years 9 months ago #51961 by micker
maybe you can use second level of ordering ?

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
9 years 9 months ago #51962 by Espi87
This will Order by categories, but they are still in a row without a break between them.

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

More
9 years 9 months ago #51967 by ggppdk
Hello

if you only assign items to main category without secondary categories you can do this:



in you custom template "myblog"
edit file:
components/com_flexicontent/templates/myblog/
category_items(_html5).php


replace:
Code:
$fc_item_classes = 'fc_bloglist_item';
with:
Code:
$fc_item_classes = 'fc_bloglist_item'. ($i==0 || ($items[$i-1]->catid != $items[$i]->catid) ? ' next_cat_start' : '')



then add this CSS rule to your template CSS:
Code:
.fc_bloglist_item.next_cat_start { padding-top: 48px !important; margin-top: 48px !important; border-top: 2px dashed black !important; /* example */ }



or you can use the logic:

Code:
$new_cat_start = ($i==0 || ($items[$i-1]->catid != $items[$i]->catid)); ... if ($new_cat_start) { // do something }


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
9 years 9 months ago #51985 by Espi87
Thank you for this possible solution,
but we rely on categories...
so, is there any possibility to "ask for current category and clear after last post" if i have articles structured like i've written in my first post?

QUESTION:
If i don't create subcategories and assign items only to main category, how do i split them into these subcategories? ^^ did i misunderstood smth?^^

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

More
9 years 9 months ago #51987 by Espi87
IT WORKS!
Thank you so much. sorry i tried it now and everything is good.

+Class to new cat. and added empty div between categories with logic.
For Everybody who needs multiple category view incl. "Filterbility" .. this is the perfect solution!
Mobile optimization because first filter, then loading Content. ADVISABLE!

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.686 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