From 442ada037ddfa42a9909b6538bfb812fa1d6a7ad Mon Sep 17 00:00:00 2001 From: Tony Air Date: Thu, 16 Nov 2023 23:59:41 +0200 Subject: [PATCH] IMPR: Add element anchor name --- src/Extensions/BaseElementEx.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Extensions/BaseElementEx.php b/src/Extensions/BaseElementEx.php index d5eb0a2..3a6ae92 100755 --- a/src/Extensions/BaseElementEx.php +++ b/src/Extensions/BaseElementEx.php @@ -28,6 +28,12 @@ class BaseElementEx extends DataExtension { $obj = $this->owner; parent::updateCMSFields($fields); + + $fields->addFieldToTab('Root.Main', LiteralField::create( + 'AnchorName', + 'Element Anchor name: #e'.$this->ID + )); + $tab = $fields->findOrMakeTab('Root.Settings'); $tab->push(LiteralField::create(