Multiple template for the same article

More
12 years 5 months ago #32893 by rottenberg
Hello

My problem : I have a site which contains articles to be dispalyed in the current site and also in other sites.

Following the site the data displayed are not the same but all fields are in the article.

I try to display a template if we are in the original site and another template if the article is displayed in another site.

For the category display no problem : I have created a new category and attached a specific template to this category.

My problem is how can I use for the same article one template if in the original site and another template if the article is displayed in another site.

Is it possible to do that without duplicating the article ?

thank you for help
best regards

Michel

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

More
12 years 5 months ago #32895 by ggppdk
You can use a URL variable:

for item view:
&ilayout=sometemplate

for category view (for all category view layouts: default,myitems,author,mcats):
&clayout=sometemplate

also if you don't want to do it via URL

you could inside your joomla template or anywhere before FLEXIcontent is rendered do this:
Code:
if (JRequest::getInt('id')==44 && JRequest::getCmd('option')=='com_flexicontent' && JRequest::getCmd('view')==FLEXI_ITEMVIEW) { JRequest::setVar('ilayout', 'sometemplate'); }

NOTE: the item layout must be in the list of allowed layouts for the Content Type of the item (set this in Content Type configuration)


-- 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
12 years 5 months ago #32896 by rottenberg
thank you very much
I try the url option immediatly

best regards
Michel

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

More
12 years 5 months ago #32900 by micker
i move it in good section ;)

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.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.724 seconds
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
Save