I noticed that content blocks for a page remain in the database even after the template is changed:
1.) assign template containing a content block (i.e. {content block="test" }
2.) replace the template with another, not containing the content block ({content block="test"}
3.) the variable "test" is still set
Any ideas how to reset content blocks on template change?
Removing Content Blocks
Re: Removing Content Blocks
I like it that way, because there were several times when I accidently removed a {content} tag, later realized it, put it back, and my content was still there.
Re: Removing Content Blocks
Yes, it's useful at times.
It's not a bug report or feature request, I just need a different behavior for content blocks in a rather special case.
It's not a bug report or feature request, I just need a different behavior for content blocks in a rather special case.
Re: Removing Content Blocks
You can always remove them from the database using phpMyAdmin if you're extra careful..
What's the special case?
What's the special case?
Re: Removing Content Blocks
Some background information: I have a little little smarty loop that displays a catalog of sub-pages as thumbnails. The style of some of the thumbnails is controlled by a parameter that I put in a content block.
If the webmaster switches templates without resetting the parameter in the content block first, then he's confused why the thumbnail still shows up in the catalog. The manual way to reset content blocks is fairly easy but to streamline operations I look for an automated way to reset content blocks on template change.
If the webmaster switches templates without resetting the parameter in the content block first, then he's confused why the thumbnail still shows up in the catalog. The manual way to reset content blocks is fairly easy but to streamline operations I look for an automated way to reset content blocks on template change.
Re: Removing Content Blocks
I have a similar thing going on one of my sites, and I actually used this 'feature' to my benefit.
I had a list of icons and page titles corresponding with subpages. The icon was uploaded using GBFilePicker as a content type. The issue is that one of the 'pages' was an external link (no template). I set it to the normal template, uploaded the icon, then switched it back to being an external link. The content block containing the icon path still existed, and an icon could be used.
There might be some property somewhere, or a way to scan to see if a content block is 'active' .. However, I suspect that the list of content blocks is generated dynamically when the template is parsed.
I had a list of icons and page titles corresponding with subpages. The icon was uploaded using GBFilePicker as a content type. The issue is that one of the 'pages' was an external link (no template). I set it to the normal template, uploaded the icon, then switched it back to being an external link. The content block containing the icon path still existed, and an icon could be used.
There might be some property somewhere, or a way to scan to see if a content block is 'active' .. However, I suspect that the list of content blocks is generated dynamically when the template is parsed.
Re: Removing Content Blocks
I think you might want to tell us what version of CMSMS you are using, I thought this feature/bug was removed recently...