We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Plugin: Tied Entries

Development and Programming

Adam Khan's avatar
Adam Khan
319 posts
16 years ago
Adam Khan's avatar Adam Khan

Tied Entries

Say you’re building a comprehensive site for a large church, where each ministry has activities, each activity holds events, and photos are taken at each event. You have a weblog each for ministries, activities, events and photos. Photos have a relationship field linking to events, events to activities, and activities to ministries. You don’t want to enter redundant data, relating the photos to the ministry, because the system should already know that. But how does it? On the ministry homepage, how do you display the five latest photos from across that ministry’s events?

With difficulty, I learned was the answer. It requires either a series of embedded templates or a long SQL query in your template. But now with the Tied Entries plugin it’s easy – you can span the relationships and reverse relationships among fields and weblogs every which way using EE-style tags:

{exp:weblog:entries weblog="ministries"}
{exp:tied_entries entry_id="{entry_id}" tie="<activities<events<photos" limit="5" orderby="entry_date" sort="desc"}
{site_url}photos/{tied:photos_filename}
{/exp:tied_entries}
{/exp:weblog:entries}

See the docs for more details and another simple example with bands, albums and songs.

Tied Entries hasn’t yet been tested against any add-ons, but once there’s a demand for that I’ll get on it.

The license per commercial site costs $20, per personal site $7.50, and it’s free to download and try (requires registering at the Engaging.net site).

First ten downloaders get their first license free!

Update a few hours later: That’s it, the first ten have registered to download, once wuerml and eddiet confirm their emails.

Update 2009 Nov 17: Now ported to EEv2.

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Hi Adam,

The plugin sounds really interesting. Would be great to give this one a go but I just registered on your site and then checked my e-mail and haven’t received the activation code as of yet.

Just wondering if I’m one of the first 10 downloaders though? 😉

Looking forward to giving this one a go though.

Best wishes,

Mark

       
Adam Khan's avatar
Adam Khan
319 posts
16 years ago
Adam Khan's avatar Adam Khan

Mark, thanks for trying it. Registration should work – I’m getting the emails when test registering – but maybe email from my server is being blocked by yours.

At any rate, I’ve activated your member account.

You’re not only among the first ten, you’re the first!

       
russlipton's avatar
russlipton
305 posts
16 years ago
russlipton's avatar russlipton

Registered, logged in and tried to download, but the download link doesn’t work. Help, pls …

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen
Mark, thanks for trying it. Registration should work – I’m getting the emails when test registering – but maybe email from my server is being blocked by yours. At any rate, I’ve activated your member account. You’re not only among the first ten, you’re the first!

Hi Adam,

Thanks. Just got the e-mail now and have downloaded the file. Will give this a try out as soon as I can.

Wow I was first! Tee hee!! 😉

Best wishes,

Mark

       
Adam Khan's avatar
Adam Khan
319 posts
16 years ago
Adam Khan's avatar Adam Khan

Sorry, Russ – fixed.

       
russlipton's avatar
russlipton
305 posts
16 years ago
russlipton's avatar russlipton

No problem, have downloaded and look forward to evaluating and using …. free!

       
Adam Khan's avatar
Adam Khan
319 posts
16 years ago
Adam Khan's avatar Adam Khan

Thanks for trying, Russ, or should I say, #2 – and hopefully finding it useful.

       
Yvonne Martinsson's avatar
Yvonne Martinsson
204 posts
16 years ago
Yvonne Martinsson's avatar Yvonne Martinsson

So, you’ve continued down this path… I’ll register and see how you put it into a plug-in to execute all the relationships/embeds. Have you used it on a live site yet?

       
Adam Khan's avatar
Adam Khan
319 posts
16 years ago
Adam Khan's avatar Adam Khan

Hi Yvonne, yes, I’m using it on the Engaging.net site for info about a news item:

  • News > Jobs > Clients
  • News > Jobs > Sites > Sectors

Though sectors here could and probably should be handled in categories…

       
Dylan Smith/Context Design's avatar
Dylan Smith/Context Design
346 posts
16 years ago
Dylan Smith/Context Design's avatar Dylan Smith/Context Design

Looks interesting, I’ll check it out.

       
Sean C. Smith's avatar
Sean C. Smith
3,818 posts
16 years ago
Sean C. Smith's avatar Sean C. Smith

Looks really interesting and powerful. Have registered and downloaded.

       
Benjamin David's avatar
Benjamin David
77 posts
16 years ago
Benjamin David's avatar Benjamin David

I haven’t tried it yet but looks like a great plugin ! I took a look at the docs and I’m not sure about something…

In Expression Engine we can do single relationships, but we can have multiple reverse relationships. Does this mean that with the plugin’s selectors (‘<’, ‘>’) it brings some kind of a multi-relationships logic in Expression Engine ?

       
Adam Khan's avatar
Adam Khan
319 posts
16 years ago
Adam Khan's avatar Adam Khan
I haven’t tried it yet but looks like a great plugin ! I took a look at the docs and I’m not sure about something… In Expression Engine we can do single relationships, but we can have multiple reverse relationships. Does this mean that with the plugin’s selectors (‘<’, ‘>’) it brings some kind of a multi-relationships logic in Expression Engine ?

Benjamin,

There can and usually are multiple entries in a single reverse relationship, but there can’t be multiple reverse relationships – that is, in templates there’s no nesting of related_entries nor of reverse_related_entries tags.

The plugin accomplishes the same thing as these would, if they worked:

{exp:weblog:entries weblog="bands"}
<title>
<ul>
{reverse_related_entries weblog="albums"}
{reverse_related_entries weblog="songs"}
<li>{title}</li>
{/reverse_related_entries}
{/reverse_related_entries}
</ul>
{/exp:weblog:entries}

or

{exp:weblog:entries weblog="songs"}
{title} by 
{related_entries id="albums"}
{related_entries id="bands"}
{title}
{/related_entries}
{/related_entries}
{/exp:weblog:entries}

I’ve added these to the docs – hope it’s clearer now.

       
hothousegraphix's avatar
hothousegraphix
851 posts
16 years ago
hothousegraphix's avatar hothousegraphix

Adam, this looks absolutely amazing! And I think it may address the issue I’m currently searching on. I’m currently working on big project in which weblog relationships are what will drive how data is displayed.

weblog 1 | country weblog 2 | campaign weblog 3 | news

where

weblog 2 - campaigns are assigned a relationship to weblog 1 - countries

and

weblog 3 - news is assigned a relationship to weblog 2 - a campaign entry

So with your plugin, I’m assuming (hoping) I can from weblog 3 (a news entry) traverse thru the relationships weblog 3 > weblog 2 > weblog 1 and display data from weblog 1?

Do you have plans on porting over to 2.0?

Downloading now to check out.

       
1 2 3

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.