-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use variables (shortcode) in blocks to get some data dynamically #108
Comments
Let me give you a brief info on what I'm trying to achieve. For example, I have a Products table in the database and I want to create its block, If I will fetch the products list in Products Block so I will daily have to update the page as well to get the latest products because if I add the Product block in page today so the block will add the today's current products list in page and will convert it to HTML, The page will not dynamically get the updated products list tomorrow. I hope you understand what I'm trying to achieve. So please tell me if it is possible to get the latest Products daily, direct on the page which is built by Laravel page builder. I think we can achieve it via the shortcode method in block using blade file or PHP file. |
Hi yes this should be possible. If you create a block with a view.php file you can run any PHP you want inside the block (so also show details from database). |
Hi, thanks for responding, I've tried it but my page view isn't working, I've set up a page builder in custom routes using the method in your pinned issue (Pagebuilder in a specific controller), but my view page isn't working, could you please help me to set up the custom routes for page views in multi-languages? |
Can I get the page view in the specific controller as well? I mean how can I fetch the page data in the specific controller to view the page? |
Hi please have a look here.
|
Hi, I'm already using this code to build the page, but how can I make a custom Controller to view the saved page? |
I mean how can I view the page which is built in page-builder? when I click on view in page-builder after saving the page it comes empty without any data. How can I retrieve the page data in a specific controller? |
Issue Resolved... |
Hi, Thanks for the awesome library, I'm facing an issue, I'm trying to add a PHP variable in blocks that are defined in the controller to get some data dynamically on the page view, but unfortunately, variables aren't working. is there any other way to get the data dynamically same like Elementor page builder shortcode feature?
Thanks.
The text was updated successfully, but these errors were encountered: