Item template using secondary categories

More
10 years 2 months ago #49018 by tratcliffe
Hi,

I have created templates for use with different categories. Each content item exists in all categories. The idea is I need a number of different item views for printing different versions of the same item.

The category that uses the default template set in the content type is working fine.

However, when I form a link to a secondary category, I get unexpected results. The category view uses the template defined in the category. But, when I click on the link I have made to view the item, the item view reverts to the default template set in the content item.

I form the link like this :-

<a class="fc_item_title" href="<?php echo JRoute::_(FlexicontentHelperRoute::getItemRoute($item->slug, $item->categoryslug)); ?>">view this listing >

Here is an example of the category and item working :-

192.185.157.116/~schoolie/yacht/newhome.html

Here is an example of a secondary category where the category view uses the template set in the category parameters but where the item view reverts to the default template.

192.185.157.116/~schoolie/yacht/legal.html

all of the category and item views have the template name echoed at the top of the page so its easy to see the template switching between the two views.

I have authorized the templates in the content type.
I have cleared all caches and the problem persists.

any help would be really gratefully received, i can provide admin logins.

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

More
10 years 2 months ago #49063 by tratcliffe

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

More
10 years 2 months ago #49064 by ggppdk
Hello,

please note these:

-- the items (item view) use the template (item layout) configured in their Content Type,

-- the template (category layout) configured in each category is for use in category



but,
if some templates (the item layouts of them) are allowed for a content type, (there is a parameter in "allowed layouts" inside content type configuration)

then you can append to the item URLs, the ilayout variable, which will allow you to change the item layout used by an item view:

&ilayout=sometemplate1
&ilayout=sometemplate2
&ilayout=sometemplate3

Regards


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