How to inject a link to structure() function
Created 5 years ago by pooria

Hello

I have a lot of pages in my website so I thought it would be difficult to mirror every page in navigation module. So I decided to use this:

structure()
            .cache({'namespace': 'user'})
            .render()|raw

To render all my pages. But I need some links to my modules routes to be in some of submenus. Is there a way or I need to mirror pages in navigations one-by-one and add my custom links?

ryanthompson  —  5 years ago Best Answer

You can do what you're talking about though by overriding the macro used: https://pyrocms.com/documentation/pages-module/2.3/usage/plugin#available-options

ryanthompson  —  5 years ago

That's exactly why you would wanna use the navigation module instead :-/

ryanthompson  —  5 years ago Best Answer

You can do what you're talking about though by overriding the macro used: https://pyrocms.com/documentation/pages-module/2.3/usage/plugin#available-options

pooria  —  5 years ago

@ryanthompson I know Ryan. But I'm trying to be intuitive and creative when I'm using an intuitive and creative CMS. I'm just looking for the best practice. Thanks 😄