Talk:Using Related Items
Contents
Displaying information from two separate slices
Hi, We're doing a project where we need to display information from two separate slices in the same place. It requires more than just using displays from different slices, like we do on the front page of www.rabble.ca, because we need to display like the example below. ...we actually need to call FIELDS from two slices.
Maybe this example will explain what we need better:
-slice #1 contains the group's name and contact information.
-slice #2 contains podcast episode information.
We need to display:
Group Name #1 (from slice #1) Contact information for Group #1 (from slice #1) Episode Title (from slice #2) Episode length (from slice #2)
Group Name #2 (from slice #1) Contact information for Group #2 (from slice #1) Episode Title (from slice #2) Episode length (from slice #2)
And so on...
Is this possible to do using AA?
Thanks!
Jane rabble.ca
RE: Displaying information from two separate slices
I assume that items in your slices are "connected" throug relation field. So slice #2 has relation field (e.g. RelatedGroup/relation........) where you store item_id of the group the episode belongs to) and there are several episodes per group. Then you have to create view (let's say it will have number 852) in slice #2 that will show episodes belonging to group:
_#HEADLINE _#LENGTH
Condition 1 is set to "RelatedGroup = ". If you want to display only one episode per group, set list length to 1. Then create view in slice #2 which will look like this (names of your aliases will probably differ a litle bit)):
_#HEADLINE _#CONTACT_ {view.php3?vid=852&cmd[852]=c-1-{ _#ITEM_ID_ }}
Norbert Brazda
In the site we're developing, we show Author using 'related item' feature (author is the headline field in other slice).
http://web.tau.org.ar/testeo/riless/biblioteca.shtml
Now I find the problem that search forms can't search inside Author field, because it's vaule is just a ID No. of an item in the other slice.
So, I had to do two different searchboxes, one for each slice, but our client didn't like that, and he wants to be able to find an article by it's author (and I think he's right!).
Ivan
Not an easy task. We were talking with Honza about solution exactly to this problem (searching in related fields) in August. Perhaps he already coded something in meantime. Here are just few ideas until that new great feature is available:
An easy solution would be to use "computed field" (a good reason for upgrade of AA!). Just create new field for author's name in articles slice and use "computed field" insert function that will take author's ID and automatically store it's name into that field (so you do not need to show that field to the user/editor). Then you can easily search in that field. The problem might be if you change author's name in the authors slice (but it should not happen too frequently, if it will happen at all).
You can also write some (javascript or php) code that will first do search in authors slice, get author(s) ID and then it will do search in articles slice.
Or you might try to experiment with search in multiple slices (see http://actionapps.org/faq/detail.shtml?x=1707). You might then search in articles' fields and name of the author field (from authors slice). But there are several problems with displaying the results as search will return also items from authors slice (and we want articles, not authors).
Norbert