Split/Break after each Category in Categories view

More
9 years 10 months ago #51992 by ggppdk
Hello

i think we can add parameters in blog template for a "category block"

now we only have item blocks ?

adding an <li>...</li> with category data,
between the <li>...</li> containing items,
should not be a problem ?

if we add support for this in the CORE it will work regardless of item belonging to multiple categories


in your case you just added the CSS or you did something like:

if ($new_cat_start) {
echo "<li>New category starts here</li>";
}


-- 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 10 months ago #52007 by Espi87
This would be great to integrate.
I have added class to first <li> of new category - so i can clear it for safety suggestions ;)
and as you've written like with logic added
<div class="new_cat_title">CATEGORY HEADLINE</div> between.
so i can Display it as full line (breaker) with Headline.
Can you even tell me how to get current category title?! ^^ i'm just a designer

should be something like
echo '<div>'.$items[$i]->catid.'</div>';
but title instead of id =)

I'm using flexicontent as favorite Content plugin + Easy Language as Content Translation + Falang as module/menu Translation System. This combination is the best solution without having any Performance Problems with small and huge Websites! (acutual my Website has many categories and around 200 articles (+ will be much more) in 11 languages.

11/10 Points for Flexicontent Support ;)

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

More
9 years 10 months ago #52010 by Espi87
So for others:
Break category at the end and insert category title
(works fine with filtering):

Create new blog layout ("myblog") Template and edit file
components/com_flexicontent/templates/myblog/

choose style (standard, html5 or xhtml) and edit file
"category_items" or "category_items_html5"

Go to specific Position (for me position is "introblock") and find
Code:
$fc_item_classes = 'fc_bloglist_item';
replace with
Code:
$fc_item_classes = 'fc_bloglist_item'. ($i==0 || ($items[$i-1]->catid != $items[$i]->catid) ? ' next_cat_start' : ''); $new_cat_start = ($i==0 || ($items[$i-1]->catid != $items[$i]->catid)); global $globalcats; if ($new_cat_start) { echo '<div class="cat_title cat_titleid_'.$items[$i]->catid.'">'.$globalcats[$item->catid]->title.'</div>'; };

create classes in your css file:
.next_cat_start // This is for the first <li> of each category
.cat_title // for every title

and if you Need
.cat_titleid_123 //replace 123 with your title id!
I Need it because of some color Relations in each category.
Maybe there is a better solution for showing the title. but this works great for me.

Regards and big thanks to development
EsPi

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

More
9 years 10 months ago #52013 by ggppdk
Hello

will commit 2 parameters for blog template

1. showing a sub-category header block when next category starts
2. showing category title


with a warning in tooltip to order items by "Category", this will work regardless of multi-category assignment


-- 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 10 months ago #52218 by Espi87
Dear users,
now another Problem appears:

After everything were good, i find out that These "newly created" Headlines are not translated. I'm using falang Translation for this but it will only Show the main language. - Page Header and "category tags" will be translated normally.

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

More
9 years 9 months ago #52305 by Espi87
NOBODY KNOWS AN ANSWER?

Please... i just Need to know how to include the category titles correctly so that translation will work there, too. (see my posts before)

This won't work with translated categories via falang:
Code:
global $globalcats; echo $globalcats[$item->catid]->title;

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

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