Loading plugins/template/template.cpp +6 −0 Changes for plugins/template/template.cpp: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -443,6 +443,12 @@ namespace blogi { for (int i = 0; i < n; i++) { int devType = atoi(res[i][3].c_str()); if(devType==RenderingType::All || type==devType){ // "main" is the editor's own content mount (the current page's // document tree), never a reusable template layer — skipping it // here means callers no longer need to exclude this plugin // wholesale just to avoid duplicating that content. if(res[i][1]=="main") continue; std::string htmlVal = res[i][2]; if(htmlVal.empty()) continue; Loading src/blogi.cpp +7 −4 Changes for src/blogi.cpp: 7 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -3302,12 +3302,15 @@ void blogi::Blogi::RequestEvent(libhttppp::HttpRequest &curreq, const int tid, U } } // Run plugin Rendering() for UI-only plugins (navbar, gtm, etc.) // Skip canPublish plugins (template, content, staticpage) — they would // inject their own content into main, duplicating the editor HTML. // Run plugin Rendering() for UI-only plugins (navbar, gtm, etc.), plus // "template" (reusable header/footer/etc. layers) — Template::Rendering() // now skips layer=="main" itself, so it can no longer duplicate the // editor HTML just injected above. Other canPublish plugins (content, // staticpage) still own the whole "main" area and stay skipped. for (const blogi::Plugin::PluginData *curplg = BlogiPlg->getFirstPlugin(); curplg; curplg = curplg->getNextPlg()) { if (curplg->getInstace()->canPublish()) PluginApi *renderInst = curplg->getInstace(); if (renderInst->canPublish() && renderInst->getName() != "template") continue; try { Loading Loading
plugins/template/template.cpp +6 −0 Changes for plugins/template/template.cpp: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -443,6 +443,12 @@ namespace blogi { for (int i = 0; i < n; i++) { int devType = atoi(res[i][3].c_str()); if(devType==RenderingType::All || type==devType){ // "main" is the editor's own content mount (the current page's // document tree), never a reusable template layer — skipping it // here means callers no longer need to exclude this plugin // wholesale just to avoid duplicating that content. if(res[i][1]=="main") continue; std::string htmlVal = res[i][2]; if(htmlVal.empty()) continue; Loading
src/blogi.cpp +7 −4 Changes for src/blogi.cpp: 7 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -3302,12 +3302,15 @@ void blogi::Blogi::RequestEvent(libhttppp::HttpRequest &curreq, const int tid, U } } // Run plugin Rendering() for UI-only plugins (navbar, gtm, etc.) // Skip canPublish plugins (template, content, staticpage) — they would // inject their own content into main, duplicating the editor HTML. // Run plugin Rendering() for UI-only plugins (navbar, gtm, etc.), plus // "template" (reusable header/footer/etc. layers) — Template::Rendering() // now skips layer=="main" itself, so it can no longer duplicate the // editor HTML just injected above. Other canPublish plugins (content, // staticpage) still own the whole "main" area and stay skipped. for (const blogi::Plugin::PluginData *curplg = BlogiPlg->getFirstPlugin(); curplg; curplg = curplg->getNextPlg()) { if (curplg->getInstace()->canPublish()) PluginApi *renderInst = curplg->getInstace(); if (renderInst->canPublish() && renderInst->getName() != "template") continue; try { Loading