First I'd like to say thank you for creating such an amazing extension. Although the learning curve is a bit steep, once you get the hang of the basics, this thing is nothing short of remarkable.
With that being said, although I am not a newbie to CCK's with WordPress, SEBLOD is the first CCK I've ever used with Joomla so please be patient with me as there are some aspects of documentation that are lacking in terms of how specific field types can be used. Or I'll just blame my plain old ignorance lol.
Here's what I am trying to accomplish:
I have 3 content types.
Medical Procedures (MP)
Preparation Instructions (PI)
History Forms (HF)
Their relationship is as follows:
One PI can be assigned to many MP
One HF can be assigned to many MP
MP pages will output it's own field data and the field data of the Content Types that are assigned to it (PI and HF's)
My main goal is to output Medical Procedures and their related content types.
I saw that James Morell made a reference to use the Dynamic Checkbox field to relate to other content types in this post but specifically to articles by catid using the #__content table. I would like to relate to articles by a content type id of some sort .
I am having a hard time conceptually bridging the gap between what I need and how to use SEBLOD to accomplish this. Also I am assuming that the best way to output the related content types on the medical procedure pages would be via template mainbody override?Any help anyone could provide if I am on the right path and teaching me where I am falling short of my understanding would be greatly appreciated! Thanks
Thanks so much again for the detailed post, I sincerely appreciate your help. This will give me something to play with and test ^_^.
When I mentioned the Content Type ID, I am making an assumption that each Content Type had its own unique ID. For instance, I know each article has it's own unique ID in the #__content table but the #__content table does not store the content type ID that the article is associated with since that data is not native to that table.
The reason why relating by Content Type ID is important for my use case is because there may be articles that are not medical procedures that share the same category and I would not want those items to appear in the selection results (as it would pertain to a stakeholder or myself to be able to choose what PI's or HF's appear on MP's).
Here's a great example of one of my client's websites: 4rai.com/procedures/magnetic-resonance-imaging/3t-mri. Or if you go to procedures and select a procedure, you'll see that each procedure has a description and preparation instructions. This is all being displayed in a not so intuitive manner and that's why I am looking to try and incorporate SEBLOD to solve. Now we'd like to include history forms on each applicable medical procedure but I don't want to just copy and paste HTML modules because forms may change or be modified.
Hopefully it makes sense now why I am choosing to relate by content type ID if possible. SEBLOD is going to output the data on each procedure page just as the example link I provided.
I finally was able to figure it out. If anyone is interested. Please see my solution below.
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:
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).
Create your content types with all necessary fields in your Form View (in my example I created Medical Procedures, Preparation Instructions, and History Forms)
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).
Important: Make sure you add the Article ID field in the Content View. (View Screenshot)
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)
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:
Important: This step is crucial because this field is what is going to relate your list to your Content Type by the article ID
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)
Go to Match + Stage (or #3) and set the Match value to Any Words Exact (View Screenshot)
Then make sure you click the plus sign right next to Any Words Exact to set the separator field to a comma (",") and Comparison Rule to Unquoted. (View Screenshot)
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.
(Optional) Use the seb_minima template - As I previously stated, I wanted to control the output of each content type and list.
Save & Close
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:
You should have already added your fields in the Content View as per Step 3.1
The required "List & Search Type" field should have the exact same name as the "List & Search Type" that we created in Step 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).
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.
Hi every body, a special thank to Bonitto who drive me on right path to reach my goal...
My topic here is for two reasons :
The tutorial Bonitto need an update (as said above by himself). This is a very IMPORTANT things that an author can edit and modify his topic. I have follow his tutorial 3 times without any success before I found this topic on the forum. And here is another THANKS to Bonitto for having updated this topic :-)
The second reason is because I have follow and reproduced twice again this tuto without success. I needed to modify then some field and could make it work.
My case is similar to Bonitto's one, so I writte here what I had to do :
I have one content form for Courses and one content form for Professors.
My goal is to choose severals professors from Professors content on a Dynamic Checkbox in the Courses Content form so I can print them with Name, thumbnail and qualifications.
I reproduce the most of Bonitto tuto but had to do one change :
In the List & search form for Professors content, instead of adding the Dynamic Checkbox, i let the original "Core content type" and add the "Article ID" field. Then in my Courses content form, the parameters of the Seblod -> List field is : art_id=professor_dynamic_select (where professor_dynamic_select is obviously the name of my Dynamic Checkbox field in my Courses content form).
I spent some hours to find this workaround, but it finally did the trick.
I'm open to any comment or advice for this workaround, but the fact is I couldn't make it with the exactly way of Bonitto...