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.
I hope I can explain myself.
I would like to insert a view of a small post block by ID within a block model.
I set the views as in image 1
and I called the view in the model block but I can't see any results.
What am I doing wrong?
Thank you for contacting us and I'd be happy to assist.
I'm afraid, the screenshots are not providing the complete context of the requirement.
Can you please share temporary admin login details along with a link to a page where you'd like to show this view? I'll be in a better position to guide you accordingly.
Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.
Thank you for sharing the admin access.
I'm currently running some tests on my website with a similar view and settings and will share my findings with you shortly.
Thank you for your patience.
Thank you for waiting.
I see that on your website you have a content template named "Lista-News" created using the blocks editor.
And inside that, there is a view named "news_home" which is also created using the blocks editor and is set to show all "Posts".
Further inside this view's loop, you have included another view "Blocco_news" that is created using the classic view's editor. That nested view is also set to show the "Posts", but with a relationship query filter for the same post type.
This view is not showing any results since the relationship filter query can be used only for the posts from another post type that has a post-relationship with the current post type being shown using the view. I hope this explains why this view is showing the no items found message.
To share a better alternative, first, I'll need to fully understand the requirement that you had in mind while setting these up.
1. The content template "Lista-News" is not assigned to any post/page. Where do you plan to show its output?
2. Why you needed two nested views to show Posts? What do you expect to see through the view "news_home" and "Blocco_news"?
Yes you are right.
my idea was to create a view (Blocco_news) to use a different block editor. I will duplicate the block in different modules.
Thanks for writing back, but, I'm afraid I couldn't fully understand your last reply.
If you still need assistance around this, can you please share some details about the two questions from my last reply?
( ref: https://toolset.com/forums/topic/invoke-a-view-in-block-model/#post-1973255 )
The topic ‘[Closed] invoke a view in block model’ is closed to new replies.