APC Action Applications - Home Page

Frequently Asked Questions v2

 

Note this is a complex question, with a complex answer I don't quite understand, but it seemed important enough to put here until someone rewrites it!

On 26 Oct 2001 at 16:27, John Hall wrote:


> Here's a question from rabble.ca, reviving a thread started on this
> list in April ("Linking Back to Parent Items ...").
>
> I'll provide a simplified example. The problem involves a sharing
> relationship between two slices: "Child" and "Parent."
>
> ==========
> The slices
> ==========
>
> 1. "CHILD"
> - feeds items to "Parent"
> - slice definition includes a 3-member constant set: "first",
> "second", "third" - any item's full-text shtml template is determined
> by the constant value selected for that item (i.e. ../first.shtml,
> ../second.shtml, ../third.shtml)
>
> 2. "PARENT"
> - receives items fed from "Child"
> - receives items fed from several other slices
> - headline hyperlinks of items fed from "Child" must point back to
> "child" slice (i.e. child shtml templates + child item_id)
>
> ==========
> The problem
> ==========
>
> We can use the go.php script to automatically point "parent" headline
> hyperlinks back to "child" items.
>
> But we can't make this script respect the constant values that
> determine which fulltext shtml template to use.
>
> ==========
> The solution?
> ==========
>
> The simplest-sounding solution would be for "parent" slice alias to
> have access to the corresponding "child" item_id. Is this possible?
>
> If not, does anyone have any other ideas?... :)
>
> (Someone suggested replacing the "parent" slice with a new view on
> "child." This won't work here -- because "parent" aggregates items
> from many slices.)
>
>
>
> Thanks ... John
>
> P.S. This is a lot of info. Please let me know if anything unclear!

Honza replied
Hi John,


I think the easiest solution to this problem is to modify
/admin/se_mapping.php and /include/feeding.php3 scripts in order you can map the
id.............. and short_id........ fields too. From my first look I think, it
is not so big problem to show Id and Short Id in "From" column of
se_mapping.php3. Then you just create any "Child id" field in PARENT slice and
there you will map the short_id (or id) of item in CHILD slice.


Honza


Last Edit: Aug 17 2011

<aafaq id=1749> ~ToDo: 1749 Feeding: How to access the id field in a parent </aafaq> 

This FAQ interface was developed by Jason at Commons.ca

APC: Internet and ICTs for social justice and development APC ActionApps is a free software content management system initiated by the Association for Progressive Communications (APC)
APC - Internet and ICTs for social justice and development