Conditionally render elements #703
DigitalMystery
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to remove elements such as a div while serializing the Nodes? I have elements that I want to display in a component well div that the user is working with, but I want to remove them from the final output. I can easily remove the CSS with a value that is not present, but I am having difficulty with conditionally showing something. I set an ID on the div and then removed the entire div by looking at the class list, but Craft did not like that when trying to view it. My only thought at this point is to render the page in a hidden div or the DOM again with a boolean set to conditionally remove it.
Beta Was this translation helpful? Give feedback.
All reactions