Skip to content

fix: open blog pages in the blog editor from every entry point - #90

Merged
7underlines merged 2 commits into
Werkstattl:mainfrom
erwinwalterddf:fix/open-blog-pages-in-blog-editor
Oct 7, 2026
Merged

7underlines merged 2 commits into
Werkstattl:mainfrom
erwinwalterddf:fix/open-blog-pages-in-blog-editor

Conversation

@erwinwalterddf

@erwinwalterddf erwinwalterddf commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #89

Two changes:

  • sw-cms-detail override (new, extension/sw-cms/page/sw-cms-detail/index.js): before loading, look up the werkl_blog_entry that references the page and redirect to blog.module.detail. Orphaned blog_detail pages and regular layouts keep opening in the core editor; a failing lookup falls through to the core editor as well. sw-cms-create extends sw-cms-detail and has no route id, so it is not affected.
  • init/cms-page-type.init.js: register the blog_detail page type with hideInList: true. In the 6.7 administration getVisibleTypes() is only used by the layout wizard, so the type disappears from "Create layout" while the "Blog page" filter in the layout list (getTypes()) stays as it is. This replaces the wizard override first proposed in Open blog pages in the blog editor from every entry point and hide the blog page type from the layout wizard #89 with the core mechanism meant for it.

Details and reasoning in #89.

Tested

Shopware 6.7.10.2, OpenBlogware 5.3.0, patch applied to the installed package and the administration rebuilt:

  • #/sw/cms/detail/<pageId> of a blog entry → redirected to #/blog/module/detail/<entryId>.
  • A blog_detail page without linked blog entry and a regular shop page → stay in the core editor.
  • Layout wizard offers shop page, landing page, category page, product page and (third-party) bundle page; "Blog page" is gone. The "Blog page" filter in the layout list is unchanged.

@erwinwalterddf
erwinwalterddf force-pushed the fix/open-blog-pages-in-blog-editor branch from 3e8a64a to 7eb4982 Compare September 24, 2026 13:18
@erwinwalterddf

Copy link
Copy Markdown
Contributor Author

Update: the wizard override is not needed, the page type can be registered with hideInList: true instead (only the layout wizard uses getVisibleTypes() in 6.7). The PR reflects that.

@7underlines
7underlines merged commit ffe2fc4 into Werkstattl:main Oct 7, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Open blog pages in the blog editor from every entry point and hide the blog page type from the layout wizard

2 participants