New Custom Blog Template is Causing Module to Revert to No Content

ckingg
Participant

Hi there, 

 

I'm building a new custom blog post template via Hubl. 

 

Everything seems to be going well except for an issue with a specific module. When I apply the new template to the blog post, this module behaves as if no content was added to it.

 

The blog keeps the images and copy that was there with the prior template change but erases the content that was in this module. The module is also custom. 

 

If I switch back to the old template, the module shows that it has the content within it again. 

Any ideas? 

Happy to provide any extra information if needed! 

0 Upvotes
4 Replies 4
Teun
Guide | Diamond Partner
If you switch a template and the content is set in a different module in the old template, the content will not be available.

It is probably best to always use the 'blog content' module for the blog content, cause you will not have this issue if you ever switch the template.

If you try adding the 'old module' to the new template, does it keep the content?
Did my answer solve your issue? Help the community by marking it as the solution.
0 Upvotes
ckingg
Participant

Thanks for the reply. 

 

I'm using the same module that was in the old template. I just added the module's snippet to the Hbul/HTML template.

 

All the other content stays and shows in the new template. 

 

It's just this one module where the content from posts that are already published does not transfer to the new template. 

 

The strange part is if I switch back to the old template, the content within that module is still there and shows on the post. 

0 Upvotes
Teun
Guide | Diamond Partner

Hi @ckingg ,

 

Switching templates and keeping the content is a tricky thing. But if the module is on the same position as the old template and has the same field names, it could work. Sadly, this is never certain. Not sure there is a trick available to keep the content.

Did my answer solve your issue? Help the community by marking it as the solution.
0 Upvotes
ckingg
Participant

When I convert the old template to HTML, it shows (% module_block %) and (% module_attribute %} tags whereas in the new template I copied the code snippet and pasted it into that template. Would those tags affect this at all? 

0 Upvotes