- This topic has 8 replies, 3 voices, and was last updated 1 week, 6 days ago by David.
May 19, 2020 at 3:14 pm #1292790Paul
Been playing around with GenerateBlocks recently and wanted to see if it would be possible to create an Elements Page Header by building the header content and layout using GenerateBlocks in a brand new page (such as a full-width container with background image, and a two column grid with a headline and some text in the left column, and a contact form 7 form in the right column), then viewing the page in Code View to copy the GenerateBlocks code, and then pasting that into the page header’s content area.
Now, when I assign that page header to the page I just built with GenerateBlocks, everything looks fine.
But if I assign the page header to another page or post, the CSS doesn’t carry over, so much of the CSS styling is lost, although the heading, text and CF7 form do appear.
Why is this? Does it have to do with the uniqueID that GB assigns to each block element? Is there anything I can modify in the code generated by GenerateBlocks so I can use the blocks code globally (such as by pasting it into elements or into other pages for example)?
What I’m trying to achieve is similar to Elementor’s Template Library. And I don’t see a way to add Reusable Blocks to Elements which would seem to be the best way to go about this (maybe via shortcode).
I know this is a feature Tom has planned for GPP 1.11 (can’t wait for that!), but wanted to know if there were any work-arounds in the meantime and to share my experience so far.May 19, 2020 at 4:39 pm #1292878LeoStaffCustomer Support
Not sure if I understand this completely but I wouldn’t copy the HTML code of GenerateBlock into the header element content tab.
The better solution would be to build the header element as the content of the page using GB.
Does that help?
We will actually be doing this in the site library from now on.May 19, 2020 at 5:47 pm #1292938Paul
Yes, that’s the way I guess it has to be done now, but it sure will be nice once we can build Elements using re-usable GB blocks so that these GB-based elements can be quickly inserted into multiple pages and edited in one place globally rather than on a page-by-page basis.
Just something I wanted to experiment with to see if it was currently possible.May 19, 2020 at 6:53 pm #1292978LeoStaffCustomer SupportOctober 7, 2020 at 8:24 am #1476808Osman
I d like to jump in here, if I may and ask a question on this topic.
I am using the Merch theme and would like to add a “global container/block”-element to all my posts in my blog. Is this possible by now or not?
Basically, just a line of text/signature, that might change in the future. If so, I d then simply change the content of that “global container/block”-element, so that it displays the change in all my blog-posts, where I ve implemented it.
ThanksOctober 7, 2020 at 8:39 am #1476853DavidStaffCustomer Support
yes of course – you can use the Block Element:
It has all the Hooks available in the Hook Element 🙂October 7, 2020 at 9:24 am #1476939Paul
The question in my OP can essentially be ignored now since the type of functionality I asked about is now available in the latest version of GP Premium Elements. As always, the GP Team never fails to impress with their constant innovation and feature development. Keep up the great work guys & gals!October 7, 2020 at 9:29 am #1476947Osman
Great! However, I was hoping to select that particular Element and randomly add it within the (Generate)Block-editor, when generating content. With the hooks provided, I can’t place them where I want (before the footnotes, which vary).
@Paul: I haven t updated to GP 3.0, yet. Will update and check again.
Thank you all very much anywaysOctober 7, 2020 at 10:25 am #1477024DavidStaffCustomer Support
Thanks Paul – really appreciate the feedback.
Osman, Hooks only access areas within the Theme templates. If you’re trying to insert them inside the content then thats not possible. You would have to save a Re-usable block and insert that in the post editor.
- You must be logged in to reply to this topic.