Getting the PrimaryContent from one Node to another one


(Roman Minchyn) #1

Full description
The task was to create a Contact Form and it is a tab navigation done by javascript and now if somebody submits the contact form we should render a particular nodes PrimaryContent (or Primary Content) so the user can edit the page we tell him to edit and it gets on the right place but without redirecting or forwarding stuff so the user still stays on the same tab on the same page

So long Story short:
I needed some TypoScript to get only the PrimaryContent of a specific node

Solution
The solution is to use the FlowQuery’s “children” operator like:

${q(otherNode).children('main')}

Because the PrimaryContent of a node is by default called “main”.
Thanks to @reflexxion for that

See also: Rendering another Node inside a Node