i trying figure out way have checkbox in page content type enable me hide or show projection of images based on box being selected. best way achieve this.
here method can use , can go more detail need.
- add boolean field content type , have render check box
- use placement.info hide boolean field rendering (so doesn't show anywhere)
- override resulting projection shape in order inject logic view (i assume overriding .cshtml file) access value of boolean field. can used decide whether or not html should output.
one word of warning method. times choose not render html, work of preparing projection have been done take same performance hit whether show results or not. alternative override orchard.projections.drivers.projectionpartdriver.cs (either in theme or in module) , decide whether prepare shape based on whether or not boolean field true or false.
Comments
Post a Comment