Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
disable/enable component instead of delete if component is empty
#1
I find it always illogical that when I empty the content of a component, the component gets deleted. If I want to set this component again after some time, I might have forgotten the name. Then I have to check the theme-file again for the name. If I really wanted to delete it, I could have used the delete button, which is also present.

A workaround is putting the text <p></p> in the component I want to keep, but not shown. I could also delete the component code from the theme.

* Would be better to be able to disable and enable components via a button

* and/or the component automatically gets disabled (instead of deleted) when I empty it's content.
Reply
#2
datiswous Wrote:A workaround is putting the text <p></p> in the component I want to keep, but not shown. I could also delete the component code from the theme.

A better way is a comment <!-- -->, as an empty <p> might still change the layout (margins, etc.).
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#3
mvlcek Wrote:
datiswous Wrote:A workaround is putting the text <p></p> in the component I want to keep, but not shown. I could also delete the component code from the theme.

A better way is a comment <!-- -->, as an empty <p> might still change the layout (margins, etc.).

Ok, thanks.
Reply




Users browsing this thread: 1 Guest(s)