Project

General

Profile

Actions

Feature #105560

open

Select node of page tree via JS/PHP

Added by Philipp Kitzberger 13 days ago. Updated 12 days ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Pagetree
Target version:
-
Start date:
2024-11-08
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
medium
Sprint Focus:

Description

In previous versions of TYPO3 it's been possible to select a node of the page tree via JS:

<script type="text/javascript">
  if (top && top.TYPO3.Backend.NavigationContainer.PageTree) {
    top.TYPO3.Backend.NavigationContainer.PageTree.select(76);
  }
</script>

Unfortunately that's gone for some time now.

Since TYPO3 11 there's proper backend routing, so linking to a (custom) BE module is possible and often done with the `id` parameter to open a module "on" a specific page. Unfortunately the page tree doesn't reflect that new node. Is there a reason behind that?

Nevertheless it'd be great to have the possibility as a developer of a BE module to be able to update the selected node of the page tree.

Analog to this snippet maybe?

<f:be.pageRenderer includeJavaScriptModules="{
   1: '@typo3/backend/element/immediate-action-element.js'
}" />
<f:variable name="args" value="{0:'typo3:pagetree:mountPoint',1:{pageId:22},2:1}"/>
<typo3-immediate-action
    action="TYPO3.Backend.Event.EventDispatcher.dispatchCustomEvent" 
    args="{args -> f:format.json() -> f:format.htmlspecialchars()}" 
></typo3-immediate-action>

Actions

Also available in: Atom PDF