[r1422] Change fc-template views within the same menu-item

More
12 years 10 months ago #27370 by mcmurdok
I've created one fc-type called 'project' and two templates called 'timeline' and 'timetable', both with item and category view.
Is it possible to change the category-view 'timeline' to the other category-view 'timetable', e.g. with something like to enhance the current URL with '?layout=timetable'?
This switcher I would then integrate in this two templates.
I don't want to create new menu-items, because I want to do as much as possible from the frontend, only by creating new items and assign them to the correct category.

Regards

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

More
12 years 10 months ago #27381 by mcmurdok
I could do it by rendering my two different views by one template together in one page. To switch from the one to the other view I would use js (hide & show).
But this is not really what I want.
Do you have any other ideas?
Regards

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

More
12 years 10 months ago #27388 by ggppdk
I had added layout variable before and then removed it

This is the comment from r1422 ...

+ (a) Added item / category template layout override via URL variable ilayout & clayout, with checking for allowed / existing templates, ...

You can use
&ilayout=tmplnameb for item view
and
&clayout=tmplnameb for category view

The code will check if template exists, and for item view it will also check if it is allowed by the item's content type.

Get current SVN version or wait i will make v1.5.6a and v2.0a soon


-- 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 10 months ago #27398 by mcmurdok
Thank you,
I tried it and it works so far. It's exactly what I needed. Great

Regards

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

More
12 years 10 months ago #27400 by ggppdk
Note:
If both the original template set for item/item 's Content Type and the template used via URL override, have the same parameter name e.g. colscount == 2 , then this will effect the overriding template too ...


-- 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 10 months ago #27402 by mcmurdok
I just recognized that the fields of the original template set for item/item 's Content Type are the same fields in the overriding template.
The overriding template doesn't use its fields, assigned in fc-template backend.
For example, I have a Content-Type ('project') with two fields 'date' and 'budget'.
If the original template ('timeline') uses only a field called 'date' and the overriding template ('budget') usally uses only a field 'budget' it will correctly load the template 'budget' but show the field 'date', as from the original assignment (item/category/menu-item).
Is this a correct behavior?

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

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