Hi
I am trying to create a view where the entire view is clickable linked to the post the view Loop is handling.
But the Toolset Container block is not possible to be clickable.
The only clickable block is the button. So It is not possible to make the entire loop output clickable.
I have tried to insert a button, where the text is dynamic and includes a date and time.
I have a custom post field named "lektion-starter" which is a date time field. and If I try to insert this on the button text like this.
Live d.[types field='lektion-starter' style='text' format='d.m.Y %K%L G:i'][/types]
Then this is what is displayed on the button and not the value of the field (custom formatted date)
hidden link
And If I try to alter the html output, I get a warning (if I wrap the html in a ) and the entire view is messed up. And its not possible to fix afterwards.
So at the moment I can't link to the post if I use the view block editor.
Lots of these issues could be solved if the toolset container could be made clickable. So I could wrap the entire thing in a URL.
Hello,
How do you setup the button block, I have tried it in my localhost with a fresh wordpress installation + the latest Toolset plugins, it works fine.
Here is the screenshot for button block in admin side: button-admin:
Button text: types field='lektion-starter' style='text' format='d.m.Y %K%L G:i'][/types]
Button link: [wpv-post-url]
Test it in front-end, I can see it works just fine, it outputs the button as a HTML link, see screenshot button-front.JPG
Hello Luo.
Ok Thanks I thought that adding the shortcode to the button did not work because the output of the button was not renderend in gutenberg, but it was rendered if I used the dynamic setting in the meta box. So the button is fixed.
But how do I wrap the entire container in a link?
For the problem:
But how do I wrap the entire container in a link?
You can add two HTML blocks, setup the HTML links, for example:
<a href="[wpv-post-url]">
Use them to wrap other blocks/contents, see screenshot:
link1.JPG
Yes this actually works.
Now is there a way I can drag a toolset container into another container?
Or do I have to recreate everything from scratch, because so far I have not had any luck dragging existing blocks into a container.
I assume the original questions of this thread is resolved, for the new question, please check the new thread here:
https://toolset.com/forums/topic/is-there-a-way-i-can-drag-a-toolset-container-into-another-container/
Hi Lou
I made a simple example where I wrapped everything between two custom html blocks as you suggested. And it worked.
Then I remade my view, and it did not work.
I did some investigation and at first I thought it stopped working because I had containers inside containers, but then I discovered (while I recorded a video for you) that it is actually not the container that causes problems, but if you include a toolset button inside the wrapped html, the view rendering gets confused and closes the <a> tag at the wrong location.
Please see this video, and perhaps retry this on your own wordpress installation.
hidden link
And I am sorry for suspecting the container block to be the culprit, when it actually was the toolset button. 🙂
The Toolset button block will output HTML a element in front-end, for example:
<a class="tb-button__link" href="<em><u>hidden link</u></em>" data-toolset-blocks-button="9412ad3880b10ce70e2fb7202802772e"><i class="tb-button__icon"></i><span class="tb-button__content">Click me!</span></a>
So you can not wrap one HTML a element within another HTML a element , see HTML document:
hidden link
12.2.2 Nested links are illegal
Links and anchors defined by the A element must not be nested; an A element must not contain any other A elements.
So its not possible due to html standards.
Thank you.