Search

I have a section for Nonprofits with a subsection for Grants (using Subsection Manager 3). Grants can have a single Funder (a select box link). Given a Funder, I can create a data source to find all the Grants.

Is it possible to include a reference to the parent Nonprofit inside the Grant? That is, I can go from Nonprofit -> Grants -> Funder, but I don't know how to create a datasource that goes in the reverse direction, Funder -> Grants -> Nonprofit.

Let's put it this way:

Section Parents
- Title = Textbox
- Related children = SBL/SBL+/SSM    

Section Children
- Title = Textbox

Filtering for SBL/SBL+/SSM works in both ways:

  1. From Parents to Children: In datasource Parents output parameter Related children and filter a datasource Children :: By ID on system:id with value {$ds-parents.related-children}

  2. From Children to Parents: In datasource Children output parameter system:id and filter a datasource Parents :: By Related children on related-children with value {$ds-children.system-id}

If I understood correctly, this is the structure of your relations (perhaps the names are not correct, I'll use them just to show the solution):

Section Nonprofits
- Related Grants - SSM

Section Grants
- Related Funder - SBL

Section Funders

I assume you have a datasource which retrieves funders, let's call it Funders :: Index. I'll show the required settings for each datasource to retrieve related Nonprofits:

Funders :: Index
- output parameter: system-id

Grants :: By Related funder
- filter: funder = {$ds-funders-index.system-id}
- output parameter: system-id   

Nonprofits :: By Related grants
- filter: grants = {$ds-grants-by-related-funder.system-id}

Like this guy said:

There are only two hard things in Computer Science: cache invalidation and naming things.

-- Phil Karlton

You've seen above a method for naming related datasources.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details