This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
vb8751
Hey!, is there an option to make a RelationRender list in a backend controller "ReadOnly" , other than setting it in the config_relation.yaml ? I need to make the relation readOnly within the Preview version of my model ? Can I set a different config_relation.yaml for preview only?
thank you so much!
kallef
Create two partial fields, one for each context. update and preview, in the partial of preview, just pass the readOnly parameter in the render, example:
<?= $this->relationRender('addresses', ['readOnly' => true]); ?>
1-2 of 2