TransWikia.com

Show parents of entry in custom entries field extending BaseRelationField

Craft CMS Asked by Bobby on June 15, 2021

The default BaseRelationField shows only the name of the selected entry in the field (e.g. "SubEntryX"). I created a custom entries field by extending the BaseRelationField in a module. Now what would be an elegant way to also show the parent of an entry in the field (e.g. "ParentEntryX > SubEntryX".

I think this would be possible by using a custom template for the field using protected $inputTemplate = 'customtemplate'; but it seems like an overkill.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP