- This topic has 3 replies, 2 voices, and was last updated 1 week, 6 days ago by Leo.
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 #1292978
- You must be logged in to reply to this topic.