Jacques Corby-Tuech Posted April 27, 2017 Posted April 27, 2017 Hi, Are there any resources or documentation that explains how the database relationship field works in Pages? I have created a database on my forum and would like to connect it to another database based on a unique title field but am not sure how this actually works. The first database: https://www.rendforums.com/items This should have a field for a linked database called "recipe" which would describe how an item is crafted. Can a database have multiple relationship fields? ie can an item have multiple recipes associated with it?
opentype Posted April 27, 2017 Posted April 27, 2017 19 minutes ago, Jacques Corby-Tuech said: Can a database have multiple relationship fields? ie can an item have multiple recipes associated with it? That doesn’t need multiple fields. Just one link field which the user fills with multiple entries. You just create this field and set which database it points to. When you add an entry to this database, you get a type-ahead field where you type the title of the foreign record in the foreign database. That’s it. It then gets linked dynamically.
Jacques Corby-Tuech Posted April 27, 2017 Author Posted April 27, 2017 48 minutes ago, opentype said: That doesn’t need multiple fields. Just one link field which the user fills with multiple entries. You just create this field and set which database it points to. When you add an entry to this database, you get a type-ahead field where you type the title of the foreign record in the foreign database. That’s it. It then gets linked dynamically. That makes sense. Does it mean you can type multiple values or just one?
opentype Posted April 27, 2017 Posted April 27, 2017 You type one at a time and they are then added to the list.
Jacques Corby-Tuech Posted April 27, 2017 Author Posted April 27, 2017 Awesome, I've also now worked out how to include other fields from that linked listing via this piece of code on the record template: {$item->customFieldDisplayByKey('result', 'listing')|raw}} So I can start building out some cool stuff.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.