Use of isdtp parameter in URL in Salesforce (Hide header and Sidebar)
Hi Guys,
If we want to hide header for VF what
do you do, very simple, you just specify the showheader="false".
Similarly if want to hide Sidebar and
chat widget from VF, we specify sidebar=”false” and showChat=”false”
respectively.
These are simple attributes we use in
Page tab to hide header, sidebar and chat widget.
Ex:
<apex:page showHeader=”false”
sidebar=”false” showChat=”false”>
But suppose you want to display a
report on your VF, and you don't want the header and sidebar to appear, Or what
if in case you want to display Iframe and don’t want header,sidebar in that
Page.
isdtp comes in picture, so we can say
that main purpose of isdtp can be used to hide SFDC header and sidebar on
Standard Pages
This will work after added the
parameter in standard salesforce pages by using the url parameter: isdtp=mn or lt
or vw or nv
vw – The VF page will be rendered
without header and sidebar, supports aloha theme, allows chatter
lt – leaves off SF formatting,
page header, sidebar, tabs and section header
nv – The page will be
rendered without the tabs and sidebar, and will accommodate all the buttons in
a list view
mn – Retains Old SFDC Styling,
hides page header(tabs) and sidebar
Ex:
<apex:iframe
src="http://www.salesforce.com?isdtp=vw" scrolling="true"
id="theIframe"/>
As this is a hack and is subject to
change with different releases of Salesforce, I won’t recommend you to go for
it until and unless there is no other option available to you.
Hope it solves the issue you been
facing. :)
Comments
Post a Comment