Fork me on GitHub
2sxc 9.12 for DNN 7 to 9
Website Builder, Content Manager, App-System: open-source and amazing

Naked Output for Lightboxes, AJAX and Details-Pages

Introduced in Version 04.00.00

There are various reasons you want the 2SexyContent without the extensive page around it. Extensive demos here. Here some examples

  1. Lightboxes showing a module
  2. Custom RSS-Feeds
  3. Standard and custom JSON or JSON-P feeds
  4. AJAX retrieving HTML-fragments from the server
  5. Parent-Child (Lists with Details) scenarios

There are various ways to achieve this depending on your need:

  1. If you want a normal page (with the standard layout of this site) but only containing this module, you will need to add a parameter mid=### to the page. For example, try this link with only the ?mid=1116 parameter
  2. For lightboxes you usually need need the same module with a minimal skin (so some <html><body>...</body></html> around it). This is done using the standard DNN-parameter popUp=true (case sensitive). Try this link with ?mid=1116&popUp=true parameter
  3. There are cases where you want only what's produced by the template and nothing else. For example when creating an RSS-feed, delivering custom JSON or also creating HTML-Fragments to be re-used by javascripts. For this we created a special parameter called standalone=true. Try this link with all three parameters, you'll see that it looks ugly without the CSS and JS usually loaded in a skin, and the source code starts with a <div> tag. 

Some Tips

  1. Standalone=true will strip everything around it, so you might skip the other parameters. Don't do this, because a complex skin and more modules will cause DNN to generate all that HTML just to have it removed again. Using Standalone=true together with the minimal skin and the mid=## helps speed things up and saves resources. 
  2. Need to know the ID of the current module in Tokens? use the [Module:ModuleID] token, so your URL will look a bit like ?mid=[Module:ModuleID]. Read more about it in the related topics. 
  3. If you want to deliver the modules content as raw JSON without writing any code, this is already possible using another feature we created. Read more about it in the related topics.

Tags for this feature

Just some random content that will disapear

This is just here so you can see that this page contains more than one module. When you click one of the test links above, it will not be visible any more because adding ?mid=1116 to the URL will cause DNN to only render that module and skip all the others. 

2serve . 2invent . 2create is 2be.