Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm branding the sharepoint ribbon and need some changes (css) when the page gets in pagepreview mode.

I've got this code

<SharePoint:SpSecutirtyTrimmedControl runat="server" ID="SPSecurityTrimmedControlRibbon" PermissionString="BrowseDirectories" PermissionMode="Any">
    <Common:ScriptCssLink DebugLink="/Style%20Library/css/editor.css" Link="/Style%20Library/css/editor.css" runat="server"/>
</SharePoint:SPSecurityTrimmedControl>

Why does this css loads when the site is in PagePreview mode - ex http//test.com?pagepreview=true

share|improve this question

1 Answer 1

The security trimmed control only "trims" based on permissions. The page preview mode runs with the same user and therefore the same permissions so it will make no difference.

I solved such an issue by creating a custom control that rendered only if the query string contained PagePreview. You might try something like that.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.