Hi,
I have four Custom Post Types for a christian magazine with correpsonding relationships between them:
1.) Magazine
2.) Articles
3.) Topics (Christian Topics)
4.) Author (Authors of teh articles)
I have two Qestions:
1.) On the main site I want to display a view which does only show the articles related to the current magazine. The christian magazine is released 4 times a year (all 3 months). Example: 1/2019 -> 2/2019 -> 3/2019 -> 4/2019. The current magazine is 2/2019. So I want a view (like on this site: enlace oculto) (January 2019 on the site) which ONLY SHOWS the articles to the CURRENT magazine (in this case only the articles from magazine 2/2019). Do you know how I can display this in toolset view?
2.) I also want to display all magzines, sorted by year with therir related articles (like in this example: enlace oculto).
I created the relationships as seen in the attached picture. Also I gone through your socumentation (https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/) but the view diplays no results. Maybe you could take a look into the backend if this is helpful?
1. Conditional Toolset View
I understand that you have articles that are assigned some kind of publishing date. These articles are collected (by date) into "magazines". There are 4 magazines per year (e.g. the magazine is a quarterly publication).
You would like a view that presents a "grid" of the articles whose publication date fall within the date-range of the current or active "quarter". Is this correct?
This sounds like you will be creating a conditional view by publication date given a "magazine quarter" to actually generate the list of articles.
Some design questions:
1.1 How will you determine the quarter that should be displayed?
e.g. is it a date given by the user/reader via a "selection" of some sort? Or maybe it is based on the current month?
1.2 Would you consider adding a field or taxonomy like "Publication Quarter" to the custom post type?
Having this information stored with the post type will make the view creation much simpler. Then you could test this field to know whether or not it should be displayed or even use it as a field for a view Query Filter.
Remember, once you are able to generate the view, you still need to call it from within the page. So you should consider what information will be used to determine the quarter that will be displayed to the user. Or maybe you will include a form where the user will select the quarter to view.
Does this sound like we are going in the right direction?
2. Display all relationships (Magazine : Articles) sorted by year
I am opening the private area for system access details to be able to see how you have defined the Relationship view. The private area will only be visible between you and Toolset support.
1. Magazines sorted by Year
I connected to your site and could see that the "Magazine" CPT did not have a content-template assigned but that the contents of the post type did include all the related articles which I see is the result of the Relationship you defined between Magazine and Articles.
Specifically, you want to create a view of your Articles and set this list as the content-template of the Magazine CPT. In this way, when you click on the Magazine title, the content-template will be shown which would be the list of related articles. It is very much like the example in the documentation of displying a list of flights associated with an airport ( "When displaying a single post, display multiple related posts.")
2. Conditional Toolset View
You wrote: " what if the client creates articles and the magazine for the new quarter, before the actual quarter ends? "
Then perhaps the custom field that holds this information should not be the "publication date" but another field name like "release date". It´s a use policy that you will have to decide. Consider that there might be several dates involved with content creation: creation date, submission date, review date, approval date, release date....etc.
In my opinion, they are all dates related to the Article post type, however, and should be stored as a custom field with that post type.
You wrote: 1. Magazines sorted by Year
I connected to your site and could see that the "Magazine" CPT did not have a content-template assigned but that the contents of the post type did include all the related articles which I see is the result of the Relationship you defined between Magazine and Articles.
Specifically, you want to create a view of your Articles and set this list as the content-template of the Magazine CPT. In this way, when you click on the Magazine title, the content-template will be shown which would be the list of related articles. It is very much like the example in the documentation of displying a list of flights associated with an airport ( "When displaying a single post, display multiple related posts.")
********************************************************************************************************
I followed the tutorial, but on the site enlace oculto where the view is inserted, it always shows "No items found". I created a new view from scratch for the magazine ("Hefte") CPT and selected the Articles for the Many-Posttype as described in the example. I also created a Post Relationship filter to the Query Filter as described in the example under step 3 and for step 4 I selected Post title with link and the post excerpt. Step 5 I dont't unerstand. Is this the content template that you mentioned? Why do I need a content template in general? From the tutorials I saw (like the insert view in the Oxygen Builder that I also sent to you), I thought the ths dipaly of the view should be enough. Maybe I don't understand the concept. I also don't understand the difference between creating a template under the Tollset Dashboard for the corresponding CPT and the Content Template Button within the View section. Could you please take a look into my view, what I'am doing wrong? Sorry, but at the moment I'am very confused.
Yvette was helping out while we had a few absent from the team but has moved back to WPML support now. As you have created a new ticket (for me) on this same subject, let me close this thread and then I will follow-up in the other. See you soon.