Jump to content

Include the sidebars of other sites


sappel
 Share

Recommended Posts

Good Morning everyone,

​I'm trying to understand PW a little more for some new projects I'm currently planing. One projects is an order form I'm trying to develop with Padloper. Now I have a separate product page template for 8 different products/sites. The main content window always includes a description of the product, the price information + add to cart button are placed in the sidebar.

Now I want an overview page with all sidebars of all product pages included. In doing so I have two ways to add products to the order list: from the detailed product page and from the overview page. But how can I include the sidebar content of a page (or in this case serveral sidebar contents) into another?

Any help is appreciated,

​regards
sappel

Link to comment
Share on other sites

@sappel - maybe I am not getting exactly what you want, but something like this should do the trick.

$products = $pages->get("/products/")->children();
foreach($products as $product) [
    echo $product->sidebar;
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...