Content Types: Slaving and Chaining - Possible?

More
12 years 6 months ago #19626 by Brat
I'm working on a fairly complex project, so my apologies in advance if this question is convoluted.

The project is nicknamed "FLEXIfiction". As the name suggests, I am using Flexi to develop an online fiction library where members can post stories. So far, it's falling into place surprisingly well.

The trick of course is the story/chapter relationship. A story of course consists of chapters (from 1 to X, with X being unlimited). A story has a one-to-many relationship with chapters, whereas a chapter of course has a one-to-one relationship to a story.

That is, a chapter is bound to a story. In turn, the story is linked or chained to one or more chapters.

Hence my question.

Currently, I am using a plugin and field ids (along with a special functions) to enforce the story/chapter relationship. Basically, in the plugin I manually enter in the special field Ids and the code enforces the relationships.

However, I am wondering, is there a better method for doing this?

For example, a content type essentially is a container of fields. The problem with a Story is that the Chapter itself is a content type - you cannot just make a chapter a field as each chapter has its own title, author, etc.

Enforcing content type and field master/slave relationship is easy. But... what do you do when you have an actual content type that itself is logically supposed to be slaved?

I do have something that is workable, but the methodology is so removed from what humans understand this type of construct to be. A chapter belongs in a story - but I cannot do that because I cannot force a content type into another one.

Or can I? Is slaving/chaining possible at the content type level?

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

More
12 years 6 months ago #19627 by ggppdk
Hello, using
Select Flexi Item
and
Select Flexi Item - Reverse

From:
www.sitefaitbienfait.fr/en/downl ... ns-joomla/

is not enough ?


-- 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 6 months ago #19635 by Brat
I hadn't seen these before, believe it or not. I will give these a try and see if this helps. Thanks!

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

More
12 years 6 months ago #19636 by ggppdk
Many ideas and some code of the NEW related items field come from the author of these fields.

More over he has kindly offered to merge the related item field with select FLEXIcontent items field and also make a reverse of the NEW related items field.

You can use these fields, like this:

1. Create a new select FLEXIcontent items field and assign it to type story. Enable on this field the multiple selection parameter
2. Create a new select FLEXIcontent items Reverse field and assign it to type chapters. Set this field the reverse the above field.

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.

More
12 years 6 months ago #19709 by Brat
I did the experimenting. Unfortunately, this wasn't quite what I needed. I wrote a field plugin that is specific to chaining chapters their specific stories, and so far that works well.

In a perfect world, I'd be able to store chapters in a separate data table from their stories for better hierarchical enforcement, but this will do for now.

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

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