Jump to content

Pages - database relationship guide


Recommended Posts

Posted

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? 

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

Posted
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? 

Posted

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.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...