Search

Totally new here, and this could be something obvious that I missed in the tutorials.

I’m working on a project that requires cleanly defined one-to-many and many-to-one relationships between data models. In simplest terms, I’ve got a list of products, and a list of links (external) that I want to use to promote those products (like an affiliate).

The relationship of product:link is 1:M The relationship of link:external site is M:1

My thinking was to link via id’s from a select list box in the Blueprints interface, but that’s not an option. Products have manufacturer, model, and version, which combined create a unique description.

I want to avoid adding three list-boxes and run the risk of invalid human input (bad manufacturer/model combinations).

What am I missing here, and is there a smarter way to establish the relationships between these models in the Blueprints?

Thanks, Patrick

This is totally possible. I’m on iPhone right now brevity cuts me short.

The Reflection field can be used to concatenate the values into a unique product reference, that can then be used in a Select Box Link elsewhere. You could then have a Subsection Manager in this section pointing to a Links section that has a SBL populated by the product ref, and a SBL populated by a list of sites from a Sites section. Entries in Links act as a link table between products and sites.

I think.

Thanks for your quick reply nickdunn. I think I’m following you with using the links section as a translation/domain table for the record relationships, but it feels a bit clunky since I know there’s a primary key for the tables of interest and I really aught to just add those pkey’s as fkeys in my product link section.

If I were to make the DB in MySQL directly, I’d be thinking something like the following (for the links table): id | link’s domain | link’s full URL | product_id pkey |top level domain | http path | fkey to product section/table

The cost of doing the extra look-up on a second DB table just to confirm the references would start to get expensive as I add more and more products to a single page at render time. In my view, I hope to just have filters set up based on product ID and dump the results as a grouped set of XML elements to my CSS/XSLT magic (which I haven’t fully worked out yet :).

In the mean time, I’ll read up on the Reflection and Subsection Manager extensions. Maybe they’ll clear some of this up for me.

Thanks again!

EDIT: I’ve started looking at Reflections, and I think I see my misunderstanding. A Reflection field is created in the product section, not the link section. Then the link section just pulls that product reflection property from the blueprint creator/interface. Is that right? I think I’m done for tonight, but I’ll see how Subsection Manager fits into the solution tomorrow.

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