Create a page which it is the sub-page of the main page and can also work individually

Hi,

How to create a page which it can work as a sub-page of the first page and can also work individually?

I have a main page (page 1) to show product. The sub-page (page 2) which will show the data based on the main page.

Example. user select the product and sale date in the page 1, then the page 1 will show all the selected product detail and the page 2 will show the sale of the selected product based on the product selected in page 1 (mean page 2 will return output when page 1 complete the selection),

Plan to create the page 2 which can also work individually, There will has a date selection in the page 2, so user can also select the sale date to view all the product.

HI,

Anyone have any idea?

You could call page-2’s layout to a target div on page-1 once the criteria is met on page-1.

To do this:

from pages.page2 import layout as pg2


# callback
def pg2_layout():
    return pg2()