Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dan 1288 posts 3921 karma points c-trib
    May 05, 2019 @ 20:48
    Dan
    0

    Custom routing in v8 to render content from elsewhere in the tree

    Hi,

    I have the following content structure in a v8 site:

    > Home
    > > Products
    
    > Settings
    > > Widgets
    > > > Widget 1
    > > > Widget 2
    > > > Widget 3
    

    What I would like to do is effectively render the 'widgets' as individual web pages under the 'Products' page, such that I can have the following URLs:

    mysite.com/products/widget-1
    mysite.com/products/widget-2
    etc...
    

    There are legitimate reasons why I can't just move the nodes, so instead I'm looking for a way to create custom routing which will allow the widgets nodes to be rendered as if they're within the products section.

    I'd like the widget pages themselves to be almost the same as the products page (with all of the same main website navigation etc) but with the name of the widget node and a couple of properties from the widget node pulled through to the page, so I imagine I'd be looking at some kind of virtual content scenario whereby the base page is the products page but I'm adding some properties in for the widget-specific information which is different on each individual widget page.

    I've read the documentation but am struggling to make sense of the virtual content stuff.

    Could anyone point me to an example of how I could achieve what I'm looking to do?

    Thanks folks.

Please Sign in or register to post replies

Write your reply to:

Draft