Sitecore: Force of Query String Parameters

Sitecore is a web based system and just like to others systems it uses query string parameters to pass viable data. They are used to explicitly configure such important things as display modes, sites, languages etc. Remembering of those tricky things could have a huge speed improvement in cases when dealing with multi-language, multi-device or page editor enabled solutions. Below is the list of the Sitecore query string parameters that I have been using in my day-to-day job.

sc_mode

Used to change the display mode of the website. The following values are accepted:

  • normal – normal display – the way the users see the site
  • edit – page editor mode
  • preview – preview mode

Example: http://yoursitedomain.com?sc_mode=preview

sc_lang

Used to change the website language. Any value that is defined under /sitecore/system/languages could be used.

Example: http://yoursitedomain.com?sc_lang=tr-TR

sc_itemid

Used to change the current item

Example: http://yoursitedomain.com?sc_itemid={C5D4C95B-DB8C-465E-8F05-1386E4102765}

sc_site

Used to change the current website

Example: http://yoursitedomain.com?sc_site=yoursitename

sc_device

Used to change the device in which the website is displayed. Device name or the device id could be passed into it

Example: http://yoursitedomain.com?sc_device=mobile

Example: http://yoursitedomain.com?sc_device={446588CF-7450-4932-93F9-A53BEA6302E1}

sc_database

Used to change the database from which the content is displayed

Example: http://yoursitedomain.com?sc_database=master

The following list of query string parameters are debug specific

sc_debug

Used to start/stop the debug mode. Possible values are 0 and 1

Example: http://yoursitedomain.com?sc_debug=1

sc_prof

Used to start/stop the Sitecore profiler. Possible values are 0 and 1

Example: http://yoursitedomain.com?sc_debug=1&sc_prof=1

sc_trace

Used to start/stop the Sitecore trace. Possible values are 0 and 1

Example: http://yoursitedomain.com?sc_debug=1&sc_trace=1

sc_ri

Used to show/hide the rendering information. Possible values are 0 and 1

Example: http://yoursitedomain.com?sc_debug=1&sc_ri=1

The default debugger usually starts with all three enabled –http://yoursitedomain.com?sc_debug=1&sc_prof=1&sc_trace=1&sc_ri=1

These are the query string params that I usually use in my day-to-day job. There are probably many more of them in Sitecore that are sitting there, waiting for someone to find them 🙂 !

To effectively utilize most of mentioned query string parameters (and not only them!) the following Chrome plugin could be used

https://marketplace.sitecore.net/en/Modules/Sitecore_Developer_Tool.aspx

Useful admin pages also provided by this plugin.

Enjoy!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s