Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
site:previewAsAdmin
This component shows detailed error messages on a site in administrator preview mode. We recommend that you add it right before the closing apex:page tag. Note: The site:previewAsAdmin component contains the apex:messages tag, so if you have that tag elsewhere on your error pages, you will see the error message twice.
Example
1<!-- We recommend adding this component right before your closing apex:page tag. -->
2 <site:previewAsAdmin/>The example above renders the following HTML:
1<span id="j_id0:j_id50">
2<span id="j_id0:j_id50:j_id51:j_id52">
3<div style="border-color:#FF9900; border-style:solid; border-width:1px;
4padding:5px 0px 5px 6px; background-color:#FFFFCC; font-size:10pt;
5margin-right:210px; margin-left:210px; margin-top:25px;">
6 <table cellpadding="0" cellspacing="0">
7 <tbody><tr>
8 <td><img src="/img/sites/warning.png" height="40"
9 style="padding:5px;margin:0px;" width="40" /></td>
10 <td> <strong><ul id="j_id0:j_id50:j_id51:msgs3"
11 style="margin:5px;"><li>Page not found:test </li></ul>
12 </strong>
13 <a href="/sites/servlet.SiteDebugMode?logout=1"
14 style="padding:40px;margin:15px;">Logout of Administrator Preview Mode</a>
15 </td>
16 </tr> </tbody>
17 </table>
18</div>
19</span>
20</span>Attributes
| Attribute Name | Attribute Type | Description | Required? | API Version | Access |
|---|---|---|---|---|---|
| id | String | An identifier that allows the component to be referenced by other components in the page. | 14.0 | global | |
| rendered | Boolean | A Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to true. | 14.0 | global |