New way to call Relation Fields

2 months 3 weeks 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 :
{{autorname}}<br/>{{dateofbirth}}<br/>{{autophoto}}

And in the template, have something like :
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.

2 months 3 weeks 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.

2 months 6 days 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.

4 weeks 1 day 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.

3 weeks 6 days ago - 3 weeks 6 days 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 review. Thanks!

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

3 weeks 6 days 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
© 2018 Flexicontent. All Rights Reserved.