From 39be5f41165fe3b35649e6e2f65301f40c8bf0c1 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 28 Jun 2017 13:40:15 +0200 Subject: [PATCH] --- README.rst | 1 + code.php | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 README.rst create mode 100644 code.php diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..920b2e2 --- /dev/null +++ b/README.rst @@ -0,0 +1 @@ +inside a view helper \ No newline at end of file diff --git a/code.php b/code.php new file mode 100644 index 0000000..86e082a --- /dev/null +++ b/code.php @@ -0,0 +1,33 @@ +getTemplateVariableContainer(); + if ($tvc->exists('record')) { + //TYPO3 backend list view + $pageRecord = $tvc->get('record'); + $pageUid = $pageRecord['uid']; + } else { + //TYPO3 backend page record edit + //FIXME: is there a better way to detect the currently selected page + // in the typo3 backend? + $pageUid = current(array_keys($_GET['edit']['pages'])); + } + + //... + } +} +?> -- 2.30.2