Startseite › Toolset Professional Support › [Gelöst] Display View which shows only the articles of current magazine and show magazine
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
Verwandte Dokumentation:
Dieses Thema enthält 21 Antworten, hat 2 Stimmen.
Zuletzt aktualisiert von ThorstenS967 vor 5 Jahren, 7 Monaten.
Assistiert von: Nigel.
Hi Nigel,
unfortunately, your colleague didn't answer to my topic anymore: https://toolset.com/forums/topic/display-view-which-shows-only-the-articles-of-current-magazine/
There are currently two problems:
1.) I'am trying to display all magazines and if you click onm the magazines, it should open the corresponding articles where the user can click on the articles that belog to the corresponding magazine. It should work like in your example: https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-one-related-item-parent but when I click on a magazine, there are no articles (but in the CPT for tha magazines, all articles are shown that belong to the magazine thanks to the relationship). I'am sure, that I'am missing one step. I use Oxygen for creating the site. Maybe you could take a look into the backend and you could see, what I'am doing wrong. If you take a look into the other support thread mentioned below, I hope, that the you can see the login credentials.
2.) 1.) On the Homepage 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: versteckter Link) (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? Is there a way to realize this with Toolset?
Thanks
Thorsten
Sprachen: Englisch (English ) Spanisch (Español )
Zeitzone: Europe/London (GMT+00:00)
Hi Thorsten
Let me start with Q2, about displaying the articles for the current magazine.
The first point is, how do we know which is the current magazine?
I suspect you need to create a View with a limit of 1 ordered by date so that the View returns the last published magazine. That would be the current magazine, right?
That provides the required context, and in the output section you can then nest a second View, to show the articles related to the magazine (i.e. it includes a relationship Query Filter to show posts related to the current post in the Loop).
I want to look at your site to see what you currently have for Q1. I closed the other thread already, which removes the log-in credentials from the private reply for your security, I should have checked first.
Can I trouble you for them again?
Sprachen: Englisch (English ) Spanisch (Español )
Zeitzone: Europe/London (GMT+00:00)
Thorsten, I'm just logging in now for the first time (13:43 UTC).
Ok, thanks for the info. Than someone else was trying to login with your credentials the whole time and was blocked by the security plugin now.
Sprachen: Englisch (English ) Spanisch (Español )
Zeitzone: Europe/London (GMT+00:00)
Hi Thorsten
Any of my colleagues that had access to the private reply where you provided the username and password, well, they would have access to the password as well as the username itself and would be able to log in that way, so if someone is trying to log in with that username they do not have access to the credentials in the private reply, so I'm not sure where they are getting the username from. I checked the page source for this and the previous thread and the username is not somehow mistakenly buried in the page source that could be scraped.
Regarding the issues.
For the latest or "current" magazine, ordering by post title would actually work if the format were 2019/1, 2019/2 etc., but it is probably safer to specify the published date in a custom field and order the View of magazines by this custom field (again, setting a limit of 1 so you get only the latest magazine).
I see that you already created a View to output the magazines in a table (probably better to use a Bootstrap grid output format to be responsive), but I can't see anywhere that you are using it.
(I'm slightly confused because I'm logged in to versteckter Link in the backend but if I try to look at the home page on the front-end I get redirected to versteckter Link which doesn't look the home page designed with Oxygen.)
So the View looks right, but I can't see where to test it on the front end.
Yes. It's somewhere weired, that someone tries to login with the username I provided you the whole time.
The reason, why you not seing something in the frontend it because of redirection plugin.
There are two ways to see the frontend anyway.
1.) By visiting the site: versteckter Link and click on "Artikel" -> "Jahrgänge"
2.) In Backend: Choose Pages -> "Jahrgänge" -> Edit -> Edit with Oxygen -> In Oxygen you see, that I inserted the view in the structure panel at the right under Section -> Toolset View. Than you can click on the Back to WP -> Frontend to see the result.
Regarding the date: I created a custom field "Veröffentlichungsdatum" for the "Hefte" CPT. I also created a view "Latest Magazine Articles", which should show the latest articles from the current magazine. I think it's wrong to show the current magazine, because I want to show all articles with the exceprts (like a post archive) from the current (latest) magazine. Right now I don't have an idea how to tell the Toolset-View to show only the current articles.
Sprachen: Englisch (English ) Spanisch (Español )
Zeitzone: Europe/London (GMT+00:00)
Hi Thorsten
I couldn't see the View to display links to the magazines being used anywhere so I made a new page "Nigel" and inserted the "Hefte View", which works, inasmuch as it outputs a list of links to the magazine posts (as a sortable table; I think you will want to change that).
I also inserted the parent View for displaying the articles from the latest magazine, and that also works.
(I added a header to confirm which magazine the articles belong to, and removed where you had inserted the child View into the parent a second time, outside the loop in the Output Editor.)
So from what I can see, everything works functionally.
Hi Nigel,
thanks for the modification.
Yesterday in the evening I created the parent view "Latest Magazine Articles" wit hit's Child View ""Latest Magazine Articles Child View". I inserted it on the Main Page "Start" and it seems to display the latest articles, but if you look on the Page "Start", you'll see at the end of the view it displays "no items found". What could be the reason for this?
Also I know that I have to use bootstrap to display tha latest articles on the "Start" page like on this page (versteckter Link) -> under "January 2019". Do you have an approach for me for this?
Yes, the "Hefte View" shows the magazines. I created this view (besides of your Nigel Page) ih the "Jahrgänge" Page in Oxygen. But when I click on the link on one of this magazines, the next page shows nothing. How can I realize it when clicking on a magazine link, that it displays a view with all related articles for this magazine? So the workflow should be: In the view on "Jahrgänge" page click on one of the magazine links ->display all related articles for this magazine -> click on one article and show the related article.
Thanks again,
Thorsten
Sprachen: Englisch (English ) Spanisch (Español )
Zeitzone: Europe/London (GMT+00:00)
I can't see the "No items found" on the Start page, I suspect that is because you had added the child View to the Output Editor of the parent View as well as in the Loop, and as I mentioned in my last reply I deleted that because it doesn't belong there.
If you want to display the articles in a grid you should run the Loop Wizard and choose the Bootstrap grid option with the number of required columns.
When you click on a link to a magazine it displays the magazine post.
Those posts don't have any content, they are effectively containers for the articles, so no content is shown when you visit a magazine post.
You'll need to make sure you have a template for magazine posts, and in that template insert the child View which is used to show articles belonging to a magazine.
My issue is resolved now. Thank you!
Hi Nigel,
I had to reopen the ticket, because I also want to display the author in the "Jahrgänge" Page, if you click on one of the magazines where the articles are listet. I tried it, but it doesn't show the author last name. The view I use for this is the "Articles Child View", This child view is nested into the Hefte View. Maybe you could take a look into it?
Thanks
Thorsten
Sprachen: Englisch (English ) Spanisch (Español )
Zeitzone: Europe/London (GMT+00:00)
Hi Thorsten
The site credentials are automatically deleted when a thread is resolved, so I no longer have access to them.
Could I ask you for the again please so I can take another look at the site?
Sprachen: Englisch (English ) Spanisch (Español )
Zeitzone: Europe/London (GMT+00:00)
Hi Thorsten
Sorry, could you create a new thread with that additional question (you can assign it to me) and I'll look at the author issue here.
Sprachen: Englisch (English ) Spanisch (Español )
Zeitzone: Europe/London (GMT+00:00)
OK, we are not talking about the artikel post_author here.
You have an author CPT which has fields autor vorname and autor nachname.
You are trying to output the autor nachname field in your View "Articles Child View".
You have added Autoren to the Content Selection for this View, but that is not right.
A posts View will query the database for one or more post types and then iterate over those posts to output something.
This View is for displaying articles. It makes no sense to mix in some autoren posts and then iterate over a mix of both artikel and autor posts. The Content Selection should be just artikels.
Now, when iterating over the artikel posts and you want to output fields from a related autor post, if this were a one-to-many relationship and the autor was the "one" part of the relationship, when inserting the field with the Fields and Views button you could choose the Post Selection tab and specify that the related autor post should be used as the source.
But, because this is a m2m relationship and there could be multiple authors that is not possible. You must create a new View for autors connected to the current artikel post which outputs the autor field(s) which you insert where required in the View displaying artikels.