ED Related

Developer

Erskine Design

3rd Party (Free)


EE Version Support

  • ExpressionEngine 1.x

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Module

Tags

ED Related V2 EE Module for getting bi-directional related entries, and/or committing blocks of code if certain content doesn't exist.

This module provides two functions:

* Checks if related entries in either, or both directions exist and removes the TMPL tagdata if not
* Provides a ed_related:entries tag that uses a rel_id=”” paramater to display entries related to that entry

Why?

In the first instance the conditional enables us to ommit a whole block of html if no entries exist, so instead of having something like this:

<div id="related_stuff">
        <h3>Related Stuff</h3>
        <ul>
            <li>There is no related stuff</li>
        </ul>
    </div>

You could wrap the whole thing in an ed_related:has_content tag, and display nothing at all.

Secondly, the ed_related:entries tag takes a rel_id and direction parameter to get related entries in forward, reverse, or both directions.

Errr… Why?

Because I have been using a single playa2 field, as a gypsy field in every weblog on a site I have been working on, this way the end user can choose related content for any entry in any channel. Then in the template I can use the ed_related:entries tag to display those entries and I don’t need to know which direction they are in.

This means that whatever channel the user is creating an entry in they can relate it to whatever they like, right there, in that entry.

Example Code:

<div class="related">
        {exp:ed_related:has_content rel_id="{embed:entry_id}" weblog="projects" direction="both"}
        <h3>Related Projects</h3>
        <ul>
           {exp:ed_related:entries weblog="projects" disable="{pv_disable_default}" dynamic="off" rel_id="{embed:entry_id}" direction="both"}
           <li><a href="{pv_site_url}/work/projects/{url_title}">{title}</a></li>
           {/exp:ed_related:entries}
        </ul>
        {/exp:ed_related:has_content}

        {exp:ed_related:has_content rel_id="{embed:entry_id}" weblog="services" direction="both"}
        <h3>Related Services</h3>
        <ul>
           {exp:ed_related:entries weblog="services" disable="{pv_disable_default}" dynamic="off" rel_id="{embed:entry_id}" direction="both"}
           <li><a href="{pv_site_url}/work/services/{url_title}">{title}</a></li>
           {if no_results}
            <li>No results</li>
           {/if}
           {/exp:ed_related:entries}
        </ul>
        {/exp:ed_related:has_content}
   
        {exp:ed_related:has_content rel_id="{embed:entry_id}" weblog="news|publications" direction="both"}
        <h3>Related Reading</h3>
        <ul>
            {exp:ed_related:entries weblog="news|publications" disable="{pv_disable_default}" dynamic="off" rel_id="{embed:entry_id}" direction="both"}
            <li><a href="{pv_site_url}/{weblog}/{url_title}">{title}</a></li>
            {/exp:ed_related:entries}
        </ul>
        {/exp:ed_related:has_content}
    </div> <!-- // related -->

Parameters

Most weblog:entries params are available for the has_content method:

* weblog
* url_title
* status
* category_group
* category
* group_id
* author_id
* direction
* future_entries
* rel_id

ED Related Links

This entry was created September 6, 2011, 3:56 pm.
This entry was last updated September 7, 2011, 2:53 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!