Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3393332
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:02:17+00:00 2026-05-18T04:02:17+00:00

I have a page layout that intherits from PublishingLayoutPage . In it there is

  • 0

I have a page layout that intherits from PublishingLayoutPage. In it there is specified a number of fields – the content can be seen here: http://pastebin.com/L4fmc3qb.

However, two of the fields (SendSMS and SendEmail) I only want shown on the edit form on the page, not when it is viewed as a page. How do I hide these fields on the shown page?

Alternatively, is there any way to “inject” these two fields into the page and catch them with an item event? Currently, these fields have been added to the content type that the page makes use of and I use an item event receiver to see if they have been checked, but if there is an alternate way to do this that’s fine as well.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:02:18+00:00Added an answer on May 18, 2026 at 4:02 am

    In Sharepoint 2010 you can do this with regular CSS (I’m sure it also works with 2007, but I don’t have a system to test on now) – or check the second part of the answer.

    You first have to load a special CSS file for when you are in Edit mode:

    <PublishingWebControls:EditModePanel runat="server" id="editmodestyles">
            <!-- Styles for edit mode only-->
            <SharePoint:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/~language/Core Styles/edit-mode.css %>"
                After="<% $SPUrl:~sitecollection/Style Library/~language/Core Styles/normal.css %>" runat="server"/>
        </PublishingWebControls:EditModePanel>
    

    If you now have the class e.g. hideMeFromPage you could add that to your normal.css:

    .hideMeFromPage {
        display:none;
    }
    

    In your edit-mode.css you can now overwrite this property like so:

    .hideMeFromPage {
        display:block !important; //important, just to make sure even though it is loaded after the original declaration ;-)
    }
    

    You only have to add that style to your <div class="byline hideMeFromPage"> and attach a custom edit CSS and you are good to go.


    Edit: Stupid me… Of course you can also just put your fields within the EditModePanel tags as described on MSDN or a very nice example page with more kinks about page layouts:

    Where the previous control examined
    the user’s permissions to establish
    whether content should be shown, the
    EditModePanel looks at whether the
    current page is in display or edit
    mode. This can be incredibly useful in
    the WCM world for displaying help
    messages or other content to users as
    they edit a page. However there are
    other uses – hiding navigation, adding
    inline CSS override classes to use
    different formatting (particularly
    useful) and emitting debug information
    in the HTML output are all examples.
    via Great Controls to be aware of when building Sharepoint sites

    Example usage:

    <PublishingWebControls:EditModePanel SuppressTag="false" GroupingText="Title help" PageDisplayMode="Edit" runat="server" id="EditModePanel1">
        ~~Your fields go in here~~
    </PublishingWebControls:EditModePanel>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have layout page and the page that uses layout. How can I add
I have a SharePointWebControls:UserField in a page layout that needs to be excluded from
I have a page layout that I use in my SharePoint solution when I
I have a layout page that has variables that need to be filled. Example:
I have a layout where the all of the page content is in a
I have a box on the site of my page layout that displays the
I have a page layout that is based on tables, and as much as
I have a web page with a right floated navigation panel and content that
Is it possible to have a regular html page inherit its layout from another
I have a layout page within that layout I have used a partial view,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.