Skip Navigation

[Resolved] More issues with the WP blocks in Toolset

This thread is resolved. Here is a description of the problem and solution.

Problem:

Display view block in grid layout.

Solution:

You can follow our document to display the view block.

Relevant Documentation:

https://toolset.com/documentation/getting-started-with-toolset/create-and-display-custom-lists-of-content/

This support ticket is created 4 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Our next available supporter will start replying to tickets in about 1.36 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 17 replies, has 2 voices.

Last updated by John Mac 4 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#1606947
Screenshot 2020-04-30 at 18.31.15.png

Tell us what you are trying to do?
I'm trying to set up a 3 col grid View to display a post-type on a specific type pages. But it's hopeless to work with.

I'm adding a View to show three coloums. But on the frontend, everything is listed in one big fat columnt covering the with of the page.

It looks good enough in the editor, but on the frontpage it's just a mess.

Is there any documentation that you are following?
Following this video but it doesn't help: hidden link

Is there a similar example that we can see?
Haven't been able to create it, so no.

What is the link to your site?
hidden link

#1607795
4-columns.JPG

Hello,

I have checked the URL you mentioned above:
hidden link

I assume we are talking about the view block under text "ALL OF THIS IS YOURS IN THE YOUR BEST YOUR YET 2.0", I can see it display in four columns same as your screenshot, see my screenshot 4-columns.JPG

Is there any missing? how can I see the problem you mentioned above: but on the frontpage it's just a mess

#1607805

Hey Luo,

Yes, I got the view to work last night my trying to create on a specific page. But that's not what I'm trying to do. I need to make a template View rendering a list of posts in relation to the page it is displayed on. Instead of writing out a long story on this, here's a video.

hidden link

#1607809

Thanks for the video, the problem is in WP admin side, did you get any JS/PHP debug logs?
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

If you need assistance to locate the problem, please provide your website credentials in below private message box, also point out the problem page URL and view URL, I need to test it in a live website

#1608005

Thanks for the details, I can login your website and see the problem, please check these:
1) Dashboard-> Toolset-> Settings-> General:
hidden link
in section "Bootstrap loading", you are using option "Toolset should load Bootstrap 4", this option will load Bootstrap CSS/JS files in your website front-end

2) Both post views:
Product List for Superstack pages
hidden link
Super Stack What You Get Card list
hidden link

In section "Loop Editor", you are using option "Bootstrap grid",

3) Edit the post "Your Best Your Yet 2.0":
hidden link
You are using Blocks Editor to design above post, the Blocks Editor won't load Bootstrap CSS/JS files, so it conducts the problem, the preview of those two post views in admin side are different from front-end.

The view block created with Block editor is using different grid CSS styles, it does not use Bootstrap, so the third post view "Product Cards View" can display correctly in admin side when you edit above post.

If you want to use Toolset Blocks grid CSS styles, you will need to create the view blocks same as post view "Product Cards View", see our document:
https://toolset.com/documentation/getting-started-with-toolset/create-and-display-custom-lists-of-content/

For your reference.

#1609663

Hey Luo,

Thanks for the update. It wasn't that easy to understand what you mean here.

1. Bootstrap: I checked. Yes, it's on. You mean I should not load Bootstrap CSS? I'm using the Oxygen builder. What's the best option here when working with this builder? (I set this to "This site is not using Bootstrap CSS" now)

2. Yes, I know I'm using Bootstrap grid. This is what your video showed me. Now I'm thinking, does it matter much what I choose in the Loop Editor at all? I mean, I'm building the layout using the Block editor anyway.

3. Continuing from the Loop Editor to the "Edit with Block Editor": I'm trying to make this grid card view using the suggestion you showed in one of your videos. (Creating a new View) This needs to be a template listing a post-type as a 4 column grid-layout, showing posts based on the page it is in a relationship to.

When adding this View to a Superstack sales page, the list keeps going on repeat down the page.. ?
hidden link

What are the other options of greating a list in a grid view?

#1609733

Okay, I'm trying to create a View to list posts according to this:
"Select posts in a Which Superstack is this product for? relationship that are related to the Post where this View is shown."

I'm able to create a layout in the Block editor, then I have to select a Query filter again for the View loop. I just did that on the previous page?

Well, I make a few selections again for the filtering I want the View to be based on, just like in the Loop editor. But when I add this View to a page to use it, I'm asked to edit the orinical or a copy. I don't want that, I just want to use the View like I created. The filtering has been set when I created it!

#1610489
view-block.JPG

Please edit the problem post "Your Best Year Yet 2.0 - The Breakthrough year.":
hidden link

block "Productlist Card View" is a "Oxygen" element/template, and you are display Toolset Views in it, why do you put Toolset Views in the "Oxygen" element/template? and it makes thing complicated.

As I mentioned above, you just need to add a view block, I have setup a demo in your website:
edit the problem post:
hidden link

at the post bottom, add a view block:
- query Contributions posts
- Filter by:
Select posts in a Which Superstack is this product for? relationship that are related to the Post where this View is shown.
- in view's loop, display post title link, test it in front-end:
hidden link

It works fine. see screenshot view-block.JPG

More help:
https://toolset.com/documentation/getting-started-with-toolset/create-and-display-custom-lists-of-content/

#1610605

Hi,

The reason I have added a Toolset View inside an Oxygen template is because I need to created these pages as template based designs. Oxygen supports Toolset views, so there shouldn't be any problem doing this?

This is what I do for the View called "Product List for Superstack pages". It's added into a Oxygen Block, which makes it easy to add to these Superstack pages.

There must be a way to template this. If not, does this mean the client have to re-create this type View for each Superstack sales page they need to create? That's not going to work.

If you look at the main product list above on that page, it's called "Stack Contribution List", it's working fine. It's a Oxygen Block where the Toolset View called "Product List for Superstack pages" has been added. It's simple and fast for the user to add this Block.

Yes, I tried adding a View block straight on the page. But then we're stuck with having to re-create this for every sales page.

Next thing, I also need to create a identical view on the redeem pages for the logged in users.
hidden link

Same view with "cards" grid, but with links on them. Only problem, the loop keeps repeating down the page. Why is that?

#1611677

Hope I'm not getting abandoned on this project even though my licence runs out today. Right now because of the times we have been through, I won't be able to renew for a while.

#1611723

You don't need to recreate the same view block for each "superstack" post, you can create one content template for single "superstack" posts, and design this content template with Blocks editor, display the view block in this content template, then all single "superstack" posts will be able to use the same content template to display their contents, see our document:
https://toolset.com/documentation/getting-started-with-toolset/create-templates-to-display-custom-posts/
Create Templates to Display Custom Posts

Please let me know if you need more assistance for it.

#1611733

Okay, thanks. Good to know. But the important thing here is to make it possible for the user to add this view block where they want to fit it in. Each Superstack sales page is different.

2 Qustions.
- Why does this view keep repeating?
hidden link

- What's the option to create a view grid like this and not use the block editor?

#1611741

- Why does this view keep repeating?
I have checked the URL you mentioned above:
hidden link
It is 404 error, please check i.

I assume we are talking about the same problem:
https://toolset.com/forums/topic/more-issues-with-the-wp-blocks-in-toolset/#post-1610489

If it is, then it is a problem of Oxygen template, as I suggest you above, you can display the view block directly without Oxygen template.

- What's the option to create a view grid like this and not use the block editor?
I assume you are going to setup the view using classic editor, please check our see our document:
https://toolset.com/documentation/user-guides/views/view-layouts-101/

There are three kinds of grid layout available:
- Bootstrap grid
- Table-based grid
- Table

The table-based grid should work in the blocks editor preview.

But in my opinion, if you are using blocks editor, then use view block to avoid more unexpected result.

#1611839

Ah, sorry. This is a members only page, so you have to log in again:
hidden link

Since this view block is almost done, it would be nice to just have the repeating issue fixed. I have used Toolset views in other Oxygen designs before, and its working fine.

Let me know if there is a fix for this. If not, I have to come up with a better way of creating custom designs like this. Block editor is not a good solution.

#1612011

I have login your website, please check these:
1) Edit the problem page:
hidden link

click button "Edit Template", it redirect me to Oxygen template:
hidden link

2) On the Oxygen template, you are displaying post view "Product Cards on Redeem page", this pot view's ID is 1471:
hidden link
Above post view "Product Cards on Redeem page" is a nested view, so it conducts the problem you mentioned above.

In your case, as a workaround, you can change the option "Limit and Offset" to display only 1 item, please test again, check if it is what you want, thanks:
hidden link