Best viewed in anything

Custom Fields Related Entries

In the previous tutorial I covered using the field type related entries for the gallery. Here we relate to a weblog, and introduce two extensions: Multi Related.

Related entries is a very powerful method to include content from other weblogs or galleries in your post. It gives a drop down list of all the articles in the entry it is related to.
Below is the code for a field named “fieldname” where I am pulling in information from a separate weblog which I want to include in my article.
The id parameter is the name of your custom field.

{related_entries id=“fieldname”}
<a href=”{title_permalink=“templategroup/template}”> {title} </a> <br / >
{summary}
{/related_entries}

Once one is inside the related entries tag, any or all fields in that weblog entry can be displayed. Above I used the title, linked to the article, and included the summary field. EE docs-related entries

Multi Related Entries

image Here is a screenshot of an extension Mark Huot created - Multi - Related Entires, Multi related Entries. This extension allows one to add any number of related entries from another weblog or gallery using multi select.

 

Again, any weblog tags can be included, the data will repeat for each one. It can also be used, such as in this case, for the gallery. If using the gallery extended module with the gallery extended extension, the one below is best as File clashes with it.

Playa -Related Entries

image Here are the settings to make and set preferences for this extension. Similar but perhaps more advanced than the one above. It has the bonus of being able to add multiple weblogs to the choices, Available here.

 

image Here is the above created field. One sees here that each weblog is labeled and then the entries under that are displayed for selection.

 

Reverse Related Entries

To show all weblogs that reference the article in related entries, use the reverse related function. This will show all the entries that reference the entry, like those above.
EE docs reverse related

An entry that has related entries is called the parent or primary entry. The entries that are being related to are called its children. In the example given in the Related Entries documentation, the events would be the parents as they are pulling in the data from the performer entries, which are the children. A Reverse Relationship would be the child entries displaying all of the parent entries that have created a relationship with it. Thus, a performer entry would be able to display any and all events at which the band has played.

 

Gallery Extension

Below I demonstrate adding galleries into posts using an extension called Gallery_cat. It shows a dropdown list of your gallery categories. When selected, you can use the field name to use that category id in the code for a gallery to show in your article by including the gallery code.
Gallery Cat download, done by Robin, EE Tech support.

Below I am using the extension, selected the last four entries from a gallery category (bc), and added the category description above the photos.
One can use limit and offset to control which photos to show.

One can use the Entries tags as shown in the docs, and the categories tags.

Photos taken around British Columbia, Canada. I grew up here.

A real estate demo

Real estate demo

Recommended hosting

Custom Fields Related EntriesCustom Fields Related EntriesCustom Fields Related EntriesCustom Fields Related EntriesCustom Fields Related Entries


Shopping Cart Software - BKDesign - Reseller and Installer
Note: If you purchase from BKDesign we install the cart for free!
Constant Contact
Trusted Email Marketing
and Online Surveys

<< Back