[QUESTION] Is it possible to save header, footer and body separately for multiple pages?
Question
Hi,
I am trying to implement multiple pages. With multiple pages, I would like to share the header and footer among all pages to keep consistency, so I think the approach is to save them separately. Is this possible? Any advice?
Answers (2)
This is what I am thinking:
const html = $(editor.getHtml());
const header = html.find("header").html();
const footer = html.find("footer").html();
But I don't like the fact that I am using jQuery :/.... any work around this?
I'm not sure is a good idea detaching them in that way. Probably the best approach would be to have something like "Symbols" to keep components in sync but it's not yet implemented in GrapesJS. For now, I'd suggest working on those components (header/footer) separately and adding them later in your pages (something like https://github.com/artf/grapesjs/issues/2061#issuecomment-501476210 or https://jsfiddle.net/5vcc3en6/)
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2364
[Question] How to add toolbar functionality to the layers panel.
I am trying to add the toolbar to the layers panel and I am not sure how to go about this. Is there any way to accomplish this? toolbar Whe...
Issue #3287
QUESTION: Wrapper styling
First of all, congrats @artf for this amazing project 💯 I am currently working on a project and I wanted to ask if I can edit the wrapper...
Issue #853
[QUESTION] Create Body's trait fixed
I'm trying to create two inputs (width and backgound-color) to template's body and I would like to fix it in Panel's view. When a component...
Issue #2744
[QUESTION] Disable a block drag&drop
Hello everyone, I would like to make forbidden the drop of one block before another specific one. Context : i've create a new trait for som...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.