Jump to content

pages and subpages with images


froot
 Share

Recommended Posts

I need the following structure of pages and subpages.

A > B > C > D

What I mean is A is parent of B which is parent of C which is parent of D.
PW basically does exactly what I need in terms of structure, no need to code anything yet.

However, this is where I need some adjustments.

Each D is assigned an image and all the D should be listed on the C-level along with the D-title and other fields.
Each C is assigned an image and all the C should be listed on the B-level along with the C-title.
Each B is assigned the image from its first child and all the B should be listed on the A-page along with the B-title. 

I tried my own work-around with variables and arrays but I can imagine this to be much easier to do since PW natively almost does exactly that, except for the images. I guess it's a quite basic requirement, like posts with thumbnail or "featured image" (pardon my WP analogy). Also, as of now, my code to accomplish this is not attractive at all, it's the usual mix of html and php, maybe there's no way around this but also maybe there's just a simple API line that would kind of render what I need with not much work-around. 

Furthermore, the D can be viewed on the site but they are essentially products that will be sold on the site once I have a simple shopping cart module up and running. My question here is, should I start with the shop function and the products can be viewed as described above or should I start building the page structure as described above and add the "add to cart" function etc around that?

Last but not least I'm also confused how to even select a specific input field's value.

When I use    

echo $somevariable->get("images")->url; 

it works fine. But what if I have several input fields, How do I select one specific field? Is it whatever I labeled it with in the template settings?

because…

echo $somevariable->get("cover")->url; 

doesn't seem to work…    

Thanks for your help.
fruid

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...