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

Extension: MD Simple Relation. Creates a "simple" relationship field, storing only the entry_id.

Development and Programming

avroo's avatar
avroo
164 posts
15 years ago
avroo's avatar avroo

Hm, the plugin is not working for me.

I’ve installed it on 1.6.8, build 20091002, but I am getting strange tag code parsed in my template:

{REL[field_name]RIXjGqUxREL} (random chars at the end on a refresh)

When I change the custom field to a “normal” relationship type (from EE) instead of the MD Simple Relation, it works perfectly.

Anyone got an idea?

       
Ryan M.'s avatar
Ryan M.
1,511 posts
15 years ago
Ryan M.'s avatar Ryan M.

Well, you can’t use {related_entries} tags with this at all. The point of this add-on was to avoid the relationship table. If you need a regular relationship, just use the regular relationship field type. See my use case in this thread.

       
avroo's avatar
avroo
164 posts
15 years ago
avroo's avatar avroo

ah I see. Couldn’t find the instructions on how to use it, so that’s why I thought I had to use the default tags. Maybe it’s a good idea to add the instructions to the plugin download! 😊

Thanks!

       
Ryan M.'s avatar
Ryan M.
1,511 posts
15 years ago
Ryan M.'s avatar Ryan M.

You’re right about adding instructions. Sorry it wasn’t clear!

       
tpayton's avatar
tpayton
172 posts
15 years ago
tpayton's avatar tpayton

Ryan - doh. I just lost half a day fighting with this. Apparently the extra line you noted above to fix the field formatting was not present in the GitHub version as of the writing of this post. However, I was able to add it and now all is well.

Thanks!

       
GDmac - expocom's avatar
GDmac - expocom
350 posts
15 years ago
GDmac - expocom's avatar GDmac - expocom

Small bug found. Relating to a weblog and sorting by date ascending, still gets ordered by title. Around line 358 change

if ($row[“field_related_sort”] == “date”) { $sort = “entry_date”; } to if ($row[“field_related_orderby”] == “date”) { $sort = “entry_date”; }

       
porthos's avatar
porthos
55 posts
15 years ago
porthos's avatar porthos

Things seem to have died down on this but I’m wondering if this extension will allow me to present a list of entries the user has created. The scenario:

User A can post in weblog X. User A can post in weblog Y. When user A posts in weblog Y he/she can see a list of their posts (in a drop-down) in weblog X. User A can then select from that list to create a relationship.

Of course, all this needs to be done within an SAEF.

I think the answer to this question is “not possible” but Playa can’t do this (yet) so I’m stuck unless I can find something.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
15 years ago
Ryan M.'s avatar Ryan M.

Well, just about anything is possible. You could probably do this with PHP, by checking for the logged-in user’s ID and populating a drop-down with entries from Weblog X where they are the author. You may not even need PHP. Perhaps something like the following would work:

<select name="field_id_00" id="field_id_00">
{exp:weblog:entries weblog="x" disable="categories|category_fields|pagination|trackbacks" dynamic="off" author="CURRENT_USER"}
<option value="{entry_id}">{title}</option>
{/exp:weblog:entries}
</select>

You may have to embed that entries loop for it to work.

       
First 2 3 4

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.