-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By awesomolocity
Alright. So I'm converting a site I already have to Processwire (really enjoying it so far!). I wanted to convert the previous tables that I had data in to Processwire pages. But I'm wondering what the optimal way to structure pages would be.
So basically, I have three main tables.
Users (and all accompanying information)
Items (and all accompanying information)
Aquariums (each user only has 1 aquarium. Currently, user_id is a FK)
Fish (type of item. Aquariums may have multiple fish)
Aqua_settings (Things like lightness, temperature, etc)
So in my current setup, there are a lot of Foreign Keys. I could accomplish essentially the same thing by using the Page Reference field.
Alternatively, I could make fish and aqua_settings both be children of Aquarium. I could differentiate by doing $aquarium->children('template=aqua_settings'); or something.
So my question is...should I be using the Page Reference field or structuring the pages as children? (Or are both equally fine depending on how I want to go about doing things)
-
By t0mD
Hi,
I'm wondering if anyone could give me a bit of help, i'm a php newbie, so you mkight need to be patient!
I'm trying to build a navigation menu that's contextual depending on where you are in the site, let me try to explain.
the site tree would be something like this
Root
- section
-sub-section
-article
-article
-article
-sub-section
-article
-article
-article
-sub-section
- section
- section
- section
I need to find a way to get the -section level you are in which always has a different template from the rest (if that makes a difference) I hope this makes some kind of sense. I've been tying myself in knots trying to come up with different solutions! Many thanks in advance for any help you can give me -
By opalepatrick
Hi,
I am trying to do this:
if ($page->parents->has("by-usage")) { where I know the parent name exists and is called by-usage. Is this correct as I am not getting an error nor an expected result?
Thanks for the help.
-