This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
How can I customise the relationRender in the Preview page.
The docs have no mention of other than to say thay we can display it https://octobercms.com/docs/backend/relations#relation-display
<?= $this->relationRender('phone') ?>
I found this ( https://octobercms.com/forum/post/recordfinder-and-ability-to-add-new-items ) in the forum. But is it ok to change the core files like that
Hi you can do this.
In your model fields.yaml add a field that the type is partial
fieldnameorrelationname: type: partial
Now add another file named _fieldnameorrelationname.htm inside your controller partials inside that file
add this line
<?= $this->relationRender('relationname') ?>
Thanks that worked.
How can i set the default create option to be the current value.
What i'm trying to build is a client, contact relation. I have a list of clients and each client has many contacts.
When i click on Create Contact in the relationRender in the client preview page a pop up to create a contact is showing up.
How can I set the default client relation be the current client in the dropdown?
I would like to know how to do this as well. My best guess is that you would have to set it somewhere inside the controller. Perhaps overriding the default model value. Whatever it may be.
1-5 of 5