-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible way to delete a node? #268
Comments
E.g.:
|
BTW: Nodes don't know what they're contained in, so adding the method to the node itself isn't currently possible. This will change at some point in the future, then we could add a method to the node itself. |
ahhh perfect, thank you! |
Actually I tested it and it seems like code.remove(node) doesn't take with it, its own line if it was the only thing on the line. Would that be possible to do? (I can make a separate issue for that since that's a different feature request, if you think it's reasonable) |
Hi, one thing that comes up a lot is wanting to delete a template or a section, etc, completely from a page. What I would like is a method called
.delete()
that replaces the entire contents of the node with an empty string basically. Does some functionality for this already exist that I'm missing? Or would this be possible to add (either to the base node class, or to Template) ?Right now what I do is remove every param, then change the name to
@@@DELETE@@@
or something, then when I am done I replace all occurrences of{{@@@DELETE@@@}}
in the entire page with an empty string, but this is pretty cumbersome.The text was updated successfully, but these errors were encountered: