Sign in to follow this  
h365

PW Relations

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

 

Share this post


Link to post
Share on other sites

Welcome to the forums and ProcessWire @h365.

Some have found this topic useful when it comes to content/data relations

 

  • Like 3

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

admin page field edit links did the job, still bought the pro fields and they are really helpful as well! Thanks guys!!:)

  • Like 1

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By arjen
      So I started on the project I spoke of earlier and already got most things signed off. With the search function and some video's I was able to build the site. I got a couple of things to work on like a contactform. I guess that shouldn't be to hard. PW seems to be very intuitive and it feels very mature and well thought of.
      I used the Page Fieldtype (thanks Diogo and others from my first thread) to link pages to each other and it works like a charm. The thing is I would to see the relation two ways in the backend.
      Example: I link page A to page B1 and page B2. When I edit page A in the backend I see B1 and B2. But I'd like to see page A when I edit page B1 (or B2).
      I tried to put the same field in the other template, but that (perhaps obviously) did not work.
      What kind of field do I need to put in the template? Is this possible?
      Thanks!