Request Commands, Using the 'hid' Parameter

Release 1.0 - ...

The 'hid' parameter on the querystring has been used for many purposes. It has now been formalised as the one single way to pass grouped instruction sets to any part of the publication process.

Instructions are passed using key-value pairs separated by a semicolon:

  CopyCode image Copy Code
/smartsite.net?id=672&hid=img;mxw=300;mxh=200

The Image Processor, the PDF generator, the Virtual Path Provider and AIM currently use Request Commands. You are free to use it in any of your own applications, since it:

  • formalizes the way interdependent querystring parameters are passed
  • provides insight into the relations
  • avoids collisions between querystring parameters
  • produces shorter urls
  • is fully supported using a set of Viper commands
    • url.commands.add()
    • url.commands.get()
    • url.commands.remove()
    • etc...

Examples

Smartsite SXML CopyCode image Copy Code
{url.commands.get(request.location(), img, mxw)} ==> 300
Smartsite SXML CopyCode image Copy Code
{url.commands.addmultiple(request.location(), zzz, 's=5', 't=1')} ==> /Pub/Welcome?hid=zzz;t=5 /Pub/Welcome?hid=zzz;s=5;t=1