How to inject a link to structure() function
Created 6 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  —  6 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  —  6 years ago

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

ryanthompson  —  6 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  —  6 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 😄