Memorial Day
Support will be closed on Monday, May 28th, 2012 to enjoy Memorial Day with our friends and families.
   
2 of 2
2
Behind the Curtain Part IV
Posted: 22 August 2007 10:20 PM   [ Ignore ]   [ # 19 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11303
Joined  06-03-2002

Am I correct that you have an MP3 weblog with a relationship field for the speaker, and you are also categorizing the MP3 weblog entries?  Can you give me a non-code example of the output you are desiring?

 Signature 
Profile
MSG
 
 
Posted: 22 August 2007 10:29 PM   [ Ignore ]   [ # 20 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  603
Joined  09-20-2006

Am I correct that you have an MP3 weblog with a relationship field for the speaker, and you are also categorizing the MP3 weblog entries?

That is exactly what I am doing. 

This is what I am trying to achieve:

Dr. Larry Andersen
Larry is a master of illustrations…more bio stuff here…and he lives in WI.

Family Camp 1(this is one of the event categories)
    Session 1 (these are categorized by event and related to the speaker)
    Session 2
    Session 3
    Session 4

Family Camp 3
    Session 1
    Session 2
    Session 3
    Session 4


Is this clear or should I give some more details?

Thanks so much for your assistance!

 Signature 

MojoMotor User? Check out the MojoMotorist for MojoMotor resources and news. || MojoMotor Demo

Profile
 
 
Posted: 22 August 2007 10:39 PM   [ Ignore ]   [ # 21 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11303
Joined  06-03-2002

Ok, so what you have here is category archives output, but are wanting it within the reverse relationship for each entry.  You’re going to need either some PHP or be willing to use some embedded templates and some increased overhead.  The whole bit about displaying entries sorted under category headings is the “expensive” part I speak about in the article, and doing this inside of each entry only compounds that.  You’re no longer doing one or the other, but both.  I’d recommend taking what you’ve gotten so far, and heading over to the How To forums with it to seek some assistance on different ways you could build that type of output.

 Signature 
Profile
MSG
 
 
Posted: 22 August 2007 10:41 PM   [ Ignore ]   [ # 22 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  603
Joined  09-20-2006

I was kind of thinking it might require some custom stuff rolleyes

Thanks for all of the assistance.  I’ll keep trying to figure something out!

 Signature 

MojoMotor User? Check out the MojoMotorist for MojoMotor resources and news. || MojoMotor Demo

Profile
 
 
Posted: 24 August 2007 05:00 AM   [ Ignore ]   [ # 23 ]  
Grad Student
Avatar
Rank
Total Posts:  96
Joined  05-24-2002

Just wanted to say that relationships and reverse relationships are the reason why I bought EE for my personal site. Now I was able to transform my site from a structured article-site to a full-size imdb.com-like website and lifted EE from a blogging tool to something even more powerful than a regular CMS. I just love those relationships!

(I must say, the database size looks huge if you use a bunch of (reverse)relationships, but if you optimize your databases once in a while you solve that problem as well.)

 Signature 

You know me better than that, love. I don’t “do” anything. Things just happen.

Profile
 
 
Posted: 28 August 2007 04:21 AM   [ Ignore ]   [ # 24 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  185
Joined  04-11-2006

Hi

Another good & useful article - thanks. How I wish reverse_relationships had been available in EEv1.4!

Some thing that is a bit counter-intuitive on casual reading is the child-parent terminology.  Thus in your example, a ‘feature’ is the parent to a ‘feature_category’ and 1 child could have 10, 20 or even 10000 parents!!
 
<old man voice> I guess I’m just not used to this modern era. In my day, a child had one or two parents and that was it.</old man voice>


BTW what happens if the child is pointed to by related entry fields in two different weblogs?  Since there is no id in the reverse_related, how would do you select the weblog you want to use? 

But perhaps this is a rather hypothetical question, that is not likely to occur in practice?

Jan

 Signature 

OakenPage website works - doing simple things well

Profile
 
 
Posted: 28 August 2007 07:25 AM   [ Ignore ]   [ # 25 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11303
Joined  06-03-2002

You would supply a weblog= parameter to the {reverse_related_entries} tag pair; if you do not, then it will show all entries from all weblogs that have been related to said entry.

 Signature 
Profile
MSG
 
 
Posted: 28 August 2007 07:32 AM   [ Ignore ]   [ # 26 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  185
Joined  04-11-2006

Hah - of course.

There’s nothing like reading the docs!

Jan

 Signature 

OakenPage website works - doing simple things well

Profile
 
 
Posted: 29 August 2007 02:59 PM   [ Ignore ]   [ # 27 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  229
Joined  11-16-2004

Back to the original topic, I am buidling something very similiar on a site right now, however what can be done to hide the headings (or in this case feature categories) if there are no reverse related entries?

 Signature 

T. Payton
OneCreative | Albuquerque, NM

Profile
 
 
Posted: 29 August 2007 04:09 PM   [ Ignore ]   [ # 28 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11303
Joined  06-03-2002

The information from the weblog entries tag cannot natively be hidden or acted on based on whether the entry has been related to other entries.  Some PHP either in the template, or setup as a plugin could handle that though; I’d step over to the How To forum and ask for assistance if your comfortability with PHP is low.

 Signature 
Profile
MSG
 
 
Posted: 08 October 2007 10:29 PM   [ Ignore ]   [ # 29 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1642
Joined  01-05-2007

I just came back to this article as I knew it would come in handy for a future site and I think it has done.

The count variable is an awesome find! It took me a little while to see what was going on but I think it’s one for the assets drawer.

One thing I really like are practical examples of EE features as I can see them applied to real life situations. Of course it would be wonderful to see all the docs in this way but thank you Derek for taking the time to show us how the developers think when using EE.

I’m very much looking forward to the next installment!

 Signature 

Steven Hambleton | Hambo Development

WE SPECIALISE IN WORKING WITH AGENCIES AND BUILDING LONG TERM DEVELOPMENT PARTNERSHIPS 
Profile
 
 
Posted: 10 October 2007 10:49 AM   [ Ignore ]   [ # 30 ]  
Lab Assistant
RankRank
Total Posts:  139
Joined  05-26-2003

Derek, just wondering if there was any reason why the EE Knoweldge Base was built using Categories instead of this Reverse Entries method?
cheers Kenny

 Signature 

ExpressionEngine 2.1.3 - Build:  20101220

Profile
 
 
Posted: 13 October 2007 07:43 AM   [ Ignore ]   [ # 31 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11303
Joined  06-03-2002
kenny2 - 10 October 2007 02:49 PM

Derek, just wondering if there was any reason why the EE Knoweldge Base was built using Categories instead of this Reverse Entries method?
cheers Kenny

It required multiple levels of categories, i.e. sub-categories, and nesting isn’t possible with reverse related entries, at least, not efficiently.

 Signature 
Profile
MSG
 
 
Posted: 13 October 2007 06:34 PM   [ Ignore ]   [ # 32 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1642
Joined  01-05-2007

Hi Derek,

Is it possible to find the tutorials from you and Lisa in an easier fashion?

At the moment people have to go to Blog, then Developers Blog then find them.

Lastly, are you working on a new installment?

 Signature 

Steven Hambleton | Hambo Development

WE SPECIALISE IN WORKING WITH AGENCIES AND BUILDING LONG TERM DEVELOPMENT PARTNERSHIPS 
Profile
 
 
Posted: 05 February 2008 12:29 AM   [ Ignore ]   [ # 33 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1642
Joined  01-05-2007

Hi Derek,

You missed an OR in the first lot of counts.

{if count == 1 count == OR count == 10}<div class="tallColumn">{/if} 
 Signature 

Steven Hambleton | Hambo Development

WE SPECIALISE IN WORKING WITH AGENCIES AND BUILDING LONG TERM DEVELOPMENT PARTNERSHIPS 
Profile
 
 
Posted: 05 February 2008 01:01 AM   [ Ignore ]   [ # 34 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  11303
Joined  06-03-2002

Thanks Steven, I’ve corrected the original entry.

 Signature 
Profile
MSG
 
 
Posted: 19 November 2008 09:57 AM   [ Ignore ]   [ # 35 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  108
Joined  01-30-2008

Hi Derek,

thank you for the very usefull article.

I think it is a very good solution if there are two levels.

Do you still suggest this way if we have more than two levels,
or do we have better way of realizing this?

Example:

Chapter 1
- Section 1-1
- - Article 1-1-1
- - - Page 1
- - - Page 2
- - Article 1-1-2
- Section 1-2
- - Article 1-2-1
- - - Page 1
- - - Page 2
- - - Page 3
- - Article 1-2-2
- - Article 1-2-3
Chapter 2
- Section 2-1
- - ...
- Section 2-2
- - ...
- Section 3
- - ...

Thanks

Profile
 
 
   
2 of 2
2