Archived topic
Button Block , assigning URL parameter
8 replies · Started by Ernst Wilhelm on February 23, 2022
If I understand well I can use the blocks for visualising links.
I want to assign a url parameter to a page link, eg a post id. Can I make this?
Cheers
Solved. Was a self caused isse with a block manager plugin :)
Topic changed.
Hi there,
you should be able to manually edit the URL in the link field. It should accept manual entry of any params you need to add to the URL.
I understand.the question i am struggeling with is how to access dynamic attributes like the post id. Any idea?
What exactly should the button do when you click on it?
Today I have buttons in place controlled by a mix of php and html coding.
`<li>One example is to call a page which shows all images and allows a controlled download, URL is something like
https://r-mediabase.eu/controlled-download/?post=<strong>62246</strong></li>
<li>Another example is to call an admin page provided by a media library plugin for authorized users
https://r-mediabase.eu/wp-admin/upload.php?page=mla-menu&orderby=menu_order&order=desc&parent=<strong>62246</strong></li>`
So does this URL have to be pragmatically generated ?
If so then you will need to create a Shortcode that outputs the button HTML with the URL.
That's what's already in place right now. I wanted to change it because i likte the modular approach of generatepress/generateblocks very much. Okay. In that case please consider this ticket as resolved. Your input is very much appreciated.
Glad to be of help