How to force a template for an item in many categories ?

More
7 years 2 months ago #69932 by AlainR
Sorry I mix myself.
What we want is : when we display a category, we need that the template of this category displays the items.
And when we display another category (with, sometimes, items published in both categories), we need that the template of this other category displays the items.
I'll come back with examples.

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

More
7 years 2 months ago #69940 by ggppdk
Hello

i think that i understand you

the category A uses (the category layout) of 'template' A
the category B uses (the category layout) of 'template' B

item D is assigned to both categories A and B

you would want the item D to be shown using
- the (item layout) of template A when click via link in category view A
- the (item layout) of template B when click via link in category view B


-- 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
7 years 2 months ago #69941 by ggppdk
Hello

it is possible and simple to do it
without any change in flexicontent core package

-1- in the item type you can select the "allowed" layouts (or leave it empty meaning all layouts are allowed)
-2- then in category_items(_html).php of yout custom template, at the line that creates the item links add:
Code:
&ilayout=templatename

Of course we could add a new parameter for this category configuration so that our templates can do this out of the box
but i think this usage case is rare ?


-- 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.

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