Pages plugin - structure
Created 8 years ago by kiltedupHi,
Trying to use the Pages plugin function 'structure'.
Issue I'm having is that regardess of what I pass as the option for 'root', the output is the entire page structure of the site.
End result I'm looking for - say you are on a child page, structure will return all other child pages of the current pages parent.
Anyone used this successfully?
TIA
ryanthompson
—
8 years ago
@adnan there is also a root option which you can send a page instance / path string: https://github.com/anomalylabs/pages-module/blob/master/src/Page/Command/RenderNavigation.php#L51
Waiting to release pages 2.2 in order to write docs on it..
zvineyard
—
6 years ago
Just so it is clear, here is a practical tag example of what @kiltedup and @ryanthompson are talking about in this post:
{{ structure().root('/some/page/path').render()|raw }}
If I understood your question correctly, try the
parent
option,