Jump to content

PW Relations


h365
 Share

Recommended Posts

Hi Guys,

Just started to dig into pw and i really like it, but i have some questions which i cant really figure out.

We are running a travel portal with different tours and hotels.

 

At the moment we are using direcuts which makes it really easy to create relations

many to many, and many to one 

 

I saw different possibilites in PW (ChildPages, Repeaters) but none of them seems to totally satisfy our needs.. 

WHY?

Lets say i have a tour and i want to define the Flights for that Tour.

From The Tour i would create a Field (Flights) as a Repeater.

Within that Repeater i have 6 Fields

Airline (Another Relation to Airline Pages... ? or is there any other way of creating a list of airlines once and use them as relation?)
Flightnumber (text)
ArrivalTime (Datetime)
DepartureTime (Datetime)
DateFrom (DateTime)
DateTo (DateTime)

Till here everything works, but then how can i Add new airlines from the TOUR page ?

There is a way i found was to create new airlines but i can only define the title field, everything else has to be edited afterwards going into the Airline Page and set the Values..

----------------

Another Way is to create a Page for Each Flight with those 6 fields, but then sill i cant create and edit child pages directly from that TOUR page, i would need to create it first and then link to it from the TOUR Page.

Thank you so much for your answers & Help!

Cheers

 

Link to comment
Share on other sites

15 hours ago, h365 said:

Another Way is to create a Page for Each Flight with those 6 fields, but then sill i cant create and edit child pages directly from that TOUR page, i would need to create it first and then link to it from the TOUR Page.

I'm pretty sure ProFields: PageTable allows creation of new pages from from within the page being edited.

 

Quote

PageTable

This is one of the ProFields that is available for free (thanks to Avoine sponsorship) on the ProcessWire dev branch. Meaning, it'll be available for everyone to use as part of the core in ProcessWire 2.5. And you can use it now if you don't mind running the dev branch. PageTable has all the flexibility of repeaters, but with lower overhead from the admin/input perspective. Rather than trying to bundle all the inputs on one screen, PageTable shows you a table of items and you click on the item to edit it in a modal window. This enables it to be a lot more efficient from the admin UI perspective. It's also more flexible than repeaters are in terms of where you store your items. PageTable lets you choose where they should live, whether as children of the page being edited, or as children of some other parent page you designate. They might be a little more work to setup than repeaters, but I think that most situations where you need the flexibility of repeaters may be better served by PageTable. PageTable still can't compete with the speed and efficiency of Table or Multiplier, but consider using PageTable anywhere that you might have used Repeaters before. Repeaters and PageTable are fundamentally different from the admin UI/input perspective, so you'd want to compare them yourself to see what suits your individual input needs better. PageTable involves more clicking to create and edit items, making Repeaters potentially faster for entering data rapidly. But PageTable will scale much further in the admin UI than Repeaters will, so I would personally favor PageTable in more situations than Repeaters.

 

  • Like 1
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

×
×
  • Create New...