Reputation: 6341
When I created my light module, it was only intended to provide templates for a blog:
templates/
├── components/
└── pages/
├── blogArticle.yaml
├── blogCategory.yaml
├── blogIndex.yaml
└── blogSearch.yaml
However, now I want to add additional templates (e.g. one-off marketing pages). In order to keep my light module organized I would like to move my blog templates into a "blog" subdirectory:
templates/
├── components/
└── pages/
└── blog/
├── article.yaml
├── category.yaml
├── index.yaml
└── search.yaml
If I simply move the templates into a new "blog" subdirectory, I will get an "Unknown Template" page error and will break my blog. This is because pages reference templates by their path:
mgnl:template -> example-light-module:pages/blogIndex
How do I migrate the templates to a new subdirectory without breaking the existing blog?
Upvotes: 0
Views: 140
Reputation: 6341
The following steps should provide you with a good process:
Duplicate the current templates and move them into a new "blog" subdirectory.
Deprecate the current templates by:
visible
to false
in the template definitionsFor example:
title: DEPRECATED - Blog Article
description: Template for a single blog article.
renderType: site
visible: false
Upvotes: 3