[Resolved] Building Elements with GenerateBlocks

Home Forums Support Building Elements with GenerateBlocks

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1292790
    Paul

    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.

    #1292878
    Leo
    Staff
    Customer Support

    Hi there,

    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.

    #1292938
    Paul

    Hi Leo,

    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.

    #1292978
    Leo
    Staff
    Customer Support

    Ahh yes I got your point now 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.