You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I posted this originally as a comment on another thread - posting here as well to improve visibility.
I ended up searching for page tree functionality for a while, and finding nothing. I'm hoping that I haven't missed anything that already exists, and I know this is coming in V3, but I was too impatient and find at least having access to a full site tree quite useful.
So - if you're happy with a quickly thrown together script which has only been lightly tested, chuck this gist into a wiki page that you made with the "Raw HTML" editor. Also put the JS file in the page's "Scripts" tab, or else it won't execute.
Apologies for the quality of the code - I had only a few hours to slap this together, and didn't know GraphQL or the wiki.js schema (which also seems to not have any detailed documentation, so I ended up scrounging through the source as well). All that to say it's a bit of a rush job. I should also note that I tried using the "tree" query option, but that didn't seem to give me a complete tree, just the tree for the page - so we're using the "list" query on PageQuery instead.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I posted this originally as a comment on another thread - posting here as well to improve visibility.
I ended up searching for page tree functionality for a while, and finding nothing. I'm hoping that I haven't missed anything that already exists, and I know this is coming in V3, but I was too impatient and find at least having access to a full site tree quite useful.
So - if you're happy with a quickly thrown together script which has only been lightly tested, chuck this gist into a wiki page that you made with the "Raw HTML" editor. Also put the JS file in the page's "Scripts" tab, or else it won't execute.
If you've done it right, you'll get a full tree generated of all the pages on the site:
https://gist.github.com/CemraJC/8438a616740162661a9958c46c95315d
Beta Was this translation helpful? Give feedback.
All reactions