Relation reverse in same custom field.

More
10 years 8 months ago #49755 by arc3c
Dear,

For a client, we need to develop a flexicontent site. We have some questions about relation reverse. I will first explain what we want to obtain. You have 2 articles A and B. We want to have a custom field, e.g. related articles. In article A we link with this custom field to article B, and then automatically it should also link article B to article A. Some logic can be obtained with relation reverse but this is in another custom field, and this is not what we want. We want that the link back is filled in the same custom field because you can not manage the relation reverse field (you can't add manually items in it). So the question is quite simple, when we link an article to another article, the link back should be made automatically. How can we cover this in flexicontent?

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

More
10 years 8 months ago #49759 by ggppdk
Hello

e.g if you have 2 types:
- Singer
- Song

then
1. to Content Type singer assign a "relation" field e.g. called "Singer songs"


2. and to Content Type songs assign a "relation reverse" field that reverses the field "Singer Songs" (there is a parameter for this, inside field's 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
10 years 8 months ago #49761 by arc3c
This is correct but the custom field 'relation reverse' cannot be updated by the editor. This is only a generated custom field on which you can't add relations.
This means that you can only link items from songs or from singers but not both from both sides. And we want to be able to do this from both sides

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

More
10 years 8 months ago #49771 by ggppdk
Hello

i see, you cann't

then (for) now you will have to select the most appropriate place for placing the relation button

place it on the most important type...



The is non public (yet) "autorelations" field (is new) that displays field filters inside the items form to define automatic filtered relations

-- aka you submit or change an item and if it matches the criteria it becomes automatically related

but this is not relevant to your case, and is not available yet, will be during october

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
10 years 8 months ago #49777 by arc3c
Dear,
First of all, thanks for your answers. We are quite new in this topic.
We have done some investigations now on what is happening in the database with relation field. We can see that all the relations are maintained in the following table "prefix"+_flexicontent_fields_item_relations. We would like to change the behaviour by creating an linked article in this way, that is stores also in the database the link back. This should be easy, because the only table elements are "field id", which you know, item id " you also know", "valueorder" that needs to be unique, "value" that contains the linked article and content type id. Do you know in which php file we should adapt the code that at the moment of a related article is added, this table is updated in the 2 directions? It would help me a lot if you could tell me where this update is done so we could change the update of the database by adding the link back.
The relation reverse is just a lookup in the same table, starting from the value in stead of starting from the item id (we presume).

Many thanks

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

More
10 years 8 months ago #49784 by ggppdk


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