New way to call Relation Fields

More
6 years 1 month ago #71672 by Chabi01
Hi,

We have in FC relation and relation reverse fields.

We can show some fields related to the relation by modifying the html bloc of the field.

So, if i take the example of the site here : www.flexicontent.org/documentation/faq/7...-reverse-fields.html

we have autors and books.

So if we have for autors 3 fields : name, date of birth, photo

We can with a relation field show this informations in a book with something like :
Code:
{{autorname}}<br/>{{dateofbirth}}<br/>{{autophoto}}

And in the template, have something like :
Code:
echo $this->fields['bookname']->display; echo '<br/>'; echo $this->fields['autor_reverse_relation']->display;

Yes, but if i want to have :

Name of the Autor
Name of the book
Photo of the autor

It is not possible as fields are "mixed" for my view.

The thing could be then the possibility to call a related field with something like : myrelationfield:myspecificfieldtoshow

Then, we can build any view in category or item view :)

Thanks :)

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

More
6 years 1 month ago #71674 by Chabi01
a little add (let's be fool !)
A fantastic way in the backend could be to be able to filter a view on a relation field...
Example : i select an autor and i get all the books in relation...but maybe it already exist and i did not search enough...

More foolish : to have an additionnal tab in the item edition in admin to see the list of even "blocks" of all related items : try to imagine, i edit an autor, i have a tab "books" and i can then see or even access to each books of this autor...

:)

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

More
6 years 1 month ago #71937 by Chabi01
Hi,
As i need to get this way to show fields, i will have to "duplicate" my fields until this can be possible : i have to show only some fields but not all and mixed with the others fields in relation.

Xavier

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

More
6 years 19 hours ago #72532 by Chabi01
Hi !
Back after 6 weeks !!
Is there any new solution for this idea today ?
Thanks !
Xavier

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

More
5 years 11 months ago - 5 years 11 months ago #72578 by ggppdk
Hello

i was going to set the fields of the related item into some variable and then answer here

this did not happen, because it will be an overkill / degrade performance (in category view) to create the display HTML of all fields of related items

probably we can just expose the "raw values" and then you can call
getFieldDisplay in your item / category layout

the thing is that this is a new feature (that will not be commonly used) and other work is priority now


-- 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...
Last edit: 5 years 11 months ago by ggppdk.

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

More
5 years 11 months ago #72590 by Chabi01
Hi Georges,
Ok... Thanks for your answer :)

Have a nice day Georges !
Xavier

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

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