This site uses cookies and similar technologies.

If you don't change browser settings, you agree to it.

I understand

In this tutorial, I was trying to accomplish the following:

I have 2 content types.

  1. Medical Procedures (MP)
  2. Preparation Instructions (PI)

Their relationship is as follows:

  1. One PI can be assigned to many MP
  2. MP pages will output it's own field data and the field data of the Content Types that are assigned/related to it (PI's)

My main goal is to output Medical Procedures and their related content types. 

Please note that I created template overrides using the seb_minima template so I could control what data I wanted to output and how I wanted to style it in my Content View. OS Training has a great introductory SEBLOD course with James Morrell (Install and Override a Template) that can teach you how to do this, but some level of coding experience (php, html, css) is required. SEBLOD also offers a little tutorial on overriding positions in a template, which is crucial to understanding how to output the fields you created in the backend.

So if anyone else is looking for a solution where you are trying to display a list that will only show related content types within a specific Content View, you will need to do the following:

  1. You will need to purchase the Form and List Pack (2 plugins)
  2. You will also need to install the Dynamic Checkbox field or you can use the Dynamic Select field which comes with SEBLOD by default (I think, lol), but the Checkbox works better in this use case because it allows you to easily select how many content types relate to another content type (in my case I am selecting how many Preparation Instructions relate to a given Medical Procedure - a many to one relationship).
  3. Create your content types with all necessary fields in your Form View (in my example I created Medical Procedures, Preparation Instructions, and History Forms)
    1. Go into your Content View and add all the fields you'd like to display (More than likely you'll want to add the majority of the fields you created in your Form View).
    2. Important: Make sure you add the Article ID field in the Content View. (View Screenshot)
  4. Create your "List and Search Type" (in my case I wanted show a list of related or assigned Preparation Instructions to a Medical Procedure so I created a list and search type for Preparation Instructions)
    1. In the Form View of your "List and Search Type" add the Dynamic Checkbox field we discussed in Step 2 and configure the Construction section according to your use case. My configuration of the construction section is as follows:
      1. Important: This step is crucial because this field is what is going to relate your list to your Content Type by the article ID
      2. In my snapshot, you'll see my Where field contains catid=11 for my use case because I have it set up to put all Preparation Instructions in a specific category by default. If you choose to put your Content Type in a category, you will need to find the category ID that applies to your use case. Please note that you can use other forms of filtering in this Where field, I am still new SEBLOD so I am unsure of what other filtering can be done. (View Screenshot)
    2. Go to Match + Stage (or #3) and set the Match value to Any Words Exact (View Screenshot)
    3. Go to the Item View and drag or add all of the fields that you'd like for your list to display/output in the mainbody section.
    4. (Optional) Use the seb_minima template - As I previously stated, I wanted to control the output of each content type and list.
    5. Save & Close
  5. Then go into the Content View of the "Form and Content Type" that you'd like to display the "List & Search Types" on (i.e. I want to display a list of Preparation Instructions that apply to a Medical Procedure. So I would go into my Medical Procedure "Form & Content Type") and do the following:
    1. You should have already added your fields in the Content View as per Step 3.1
    2. Add a new field and select the SEBLOD > List field (View Screenshot) (View Screenshot)
    3. The required "List & Search Type" field should have the exact same name as the "List & Search Type" that we created in Step 4.
    4. In the Construction Section > Fields, add the Dynamic Checkbox field that you used in your "List & Search Type" (i.e. The field I created was labeled Assigned Procedure because I would be assigning a specific Preparation Instruction to Medical Procedure). You'll then see that SEBLOD will automatically show the name of the field now (i.e. assigned_procedure).
    5. Set the field to be the name of the field =art_id. (View Screenshot)
  6. That's all folks. You should now be able to view your article/content type on the front end and depending on your template selection and overrides, you'll now see that your related list is displayed within your content type.

I hope this has been helpful. I am fairly new to SEBLOD so I apologize if this was difficult to follow but finding what you need isn't very straight forward.