Conditional content

The attached example demonstrates how you can display different views of content based on the context of a dragged block. Using jQuery’s sortable functionality, we can drag blocks from one list to another. These lists then define the contexts in which we display a specific content via CSS.

I gather this approach wouldn’t be ideal when each node has a lot of content and blocks aren’t moved frequently; An ajax approach might be better in that scenario. Trickier modifications can be applied to this basic principle, wherein you display and hide sub-nodes selectively within each block (e.g. hiding a column in a table, non-summary paragraphs, etc).

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>