Twitter
Sun
21
Mar
'10
PDF
Print
Send
 
Hits (3062) | Comments (11) | Favorited (4) | Votes (1)

In Resources 1.5 we enabled native multi type support.

But it still require good experience of building sites with Resources. So by default this feature is hidden. If you want to enable it you need to add attribute multi=”1” for param name “type” in config.xml. After that section param “Submission Type” will give you ability to select few types.

Yes it is complicated. And please do not ask me where is that file and what all this means. If you cannot path this small exam it simply means you are not yet ready for multi type sections and that multi type section will give you more troubles than advantages.

Most important

First rule is: Do not ever create multi type sections. I am serious. This is what you have to keep in mind as main idea when create multi type section. Why? Because though we enabled multi type support Resources still is designed best to work with 1 type per section. There is only one case right now we see that multi type support may be required. It is when Resources section at the same time is a Mighty Commerce catalog where multi type may be needed in many cases. In cases other than that, please think carefully before you decide to set few types to one section.

 

Though we do everything to support multi type sections, as soon as you create one you are on your own.

Things you should to know

If possible try to configure everything such a way that there is only one type in category. I mean there may be few types in section but if you organize everything for not more than one type in every category, which would be very good. To be sure users can submit particular types only to particular categories, there is new parameter called “Category Limit” in content type parameters. Select in it categories that only are allowed for submission.

But it is possible to put more than one type into one category. In fact when user will see rated, visited, favorite, … records of multi type section, it is very possible that there will be records of different type in the list. So the section should actually support display different types in one record list.

To allow correct display of few types in one list, you should use either standard list templates (Those that list record fields automatically) or if you create custom list template, it should include definitions of all possible types.  Something like this

switch($item->type_id)
{
  case 12:
    echo JText::_('Weight').": ".$item->fields[23]->result;
  break;
 
  case 24:
    echo JText::_('Color').": ".$item->fields[75]->result;
  break;
}

It means that there should be definitions for every type that can be submitted to section in single list template.

That is because every type have different fields, and it is possible that any combination of record types may get on one page.

But note again, it is only if you want to use custom templates. If you use any of list template (except Table template) that comes with Resources everything should be fine.

So if it is possible to display different types on one page why we should care that there should be only not more than one type in every category? Why not to allow submit anything to anywhere?

You can allow, it is ok. But users will not be able to use filters. Because every type have it’s own filer fields, there will be unpredictable number of filters on page with more than one type on it. Resources will turn filtering off on any page with more than one type on it.

Thus, making sure there is only one type per category, you make sure that users may do search and filter.

For filters work correctly in multi type sections make sure you set section parameters

Records mode: Records in category

Filtering Mode: Current Category

Conclusion

Please, use multi type wisely. If you get a mess with your multi type section, do not harry to blame us, or Resources that it is so poor. Understand that multi type is a very, VERI complex mechanism, and it is hard to make everything work as you need without deep understanding of CCK and how it is implemented in Resources.

 


Comments
maikkauneAvatar
Quote
- -
Written by maikkaune VIP on 22 March 2010

OMG. Recently, I was fighting with the advanced mode ;-) This might be the supersonic-geek-mode :-)

-
lorielcideAvatar
Quote
- -
Written by lorielcide VIP on 22 March 2010

I read your explanation about multi type sections in incoming Resources 1.5 and suddenly I feel stupid. Such a great features but not everyone will need it.

-
maikkauneAvatar
Quote
- -
Written by maikkaune VIP on 31 May 2010

I still wonder, why category assignment is not a "tagging" mechanism. Something like simple containers. Wouldn´t it make sense to bind all filter, display and search params to the actual type?! Or maybe to the templates, which are a kind of "view" on certain items. (I remember FlexiContent or Drupal has such a logic) Please, could you explain, why you do it a different way? Its not so obvious to me.

 

-
SerhioAvatar
Quote
- -
Written by Serhio STAFF on 01 June 2010

@mikekaune

If you would set types in category parameters

1. You would need to turn ON advanced mode which is not recommended

2. You would need to edit every category to tell it what types it may accept on every new type created. In current scheme you can do it in type params easy and quickly.

3. Building list of available categories for every type I would need to select all and analyse every category to check if it can accept current type. In current scheme I jut select all categories that accept this type.

There are also another reasons which is not that significant.

I may agree that scheme in other components  may looks more intuitive and you get used to it. But in Resources it is done according to logic laying in base of the component.

Although I feel that I do not understand your question completely and miss some important point. Would you contact me by skype and explain more on that issue?

-
maikkauneAvatar
Quote
- -
Written by maikkaune VIP on 28 June 2010

Just began to investigate the template features and tried to modify some of them.

@Serhio

You mentioned the type_id , what else can i fetch from the $item as a parameter value? Is there any developer guide or at least a help chart? I am looking for the type name and other things...

-
SerhioAvatar
Quote
- -
Written by Serhio STAFF on 05 July 2010

you can easily do

print_r($item);

And find all possible properties of the object.

-
maikkauneAvatar
Quote
- -
Written by maikkaune VIP on 15 July 2010

@Serhio

"...So by default this feature is hidden. If you want to enable it you need to add attribute multi=”1” for param name “type” in config.xml. After that section param “Submission Type” will give you ability to select few types..."

I am confused. Is your statement still valid? I updated 1.4.7 install with advancedMode ON. I do have the config parameter to turn it off and on. There is no need to edit a config file anymore, right?

Does it apply to a new install, or did i miss something?

-
maikkauneAvatar
Quote
- -
Written by maikkaune VIP on 17 July 2010

ME Resources 1.5 - MultiType Section - Standard feature !? Just to be sure others and me will get the idea:

SECTION (multi-type list)

> CATEGORY1 (type 1)  (single-type list)

    >> SUBCATEGORY1_1

    >> SUBCATEGORY1_2

 > CATEGORY2 (type 2)

    >> SUBCATEGORY2_1

    >> SUBCATEGORY2_2

 > CATEGORY3 (type 3)

    >> SUBCATEGORY3_1

    >> SUBCATEGORY3_2

 

This is now possible in SIMPLE MODE (great idea an important standard feature!!!)

 

 

The "evil" ADVANCED MODE allows the following params for each category:

- ItemID target

- Sorting order

- Template assignment !

- Properties like Elements & RSS settings

-
avatar
Quote
- -
Written by Jakayla on 03 January 2012

Wait, I cannot fathom it being so srtiaghtforawrd.

-
avatar
Quote
- -
Written by ojxzqt on 03 January 2012

1c0CbG zazzeeglzuzd

-
avatar
Quote
- -
Written by pambuli on 28 January 2012

, the distinguishing characteristic of T1 is, for practical purposes, an absolute insulin deficiency. Whether it's 1A or a non-auto-immune 1B will matter only if a true cure for 1A is found -- fixing the immune system won't help if one's trouble doesn't come from there.Cheers,Felix. term life insurance rates

-
Add New Comment
Name:
Email:
Comment:
Attachment
Hide Comment
Security code:
Enter text as you see on image
 
 
What is best way for Download/Installation MightyExtensions?
 


Member Area



Member Activity

We have 1977 guests and 7 members online


MightyTemplate - Professional Joomla Templates