How to change the master page and theme dynamically in sharepoint2013 anonymous site

hi
I have to change the master page and theme dynamically in sharepoint2013 anonymous site. i have to show one master page to authenticated user  another master page to anonymous user through code
Srinivas

Hi Srinivas,
According to your description, my understanding is that you want to change the master page and theme dynamically based on the anonymous users or authenticated users.
Per my knowledge, there is not an OOB way to change the master page and theme dynamically.
SharePoint is based on Asp.net, as we know Asp.Net request processing is based on pipeline model, so we can delevlop a custom HttpModule to dynamic change the master page based on current logon user profile(using SP Object Model to get).
Another solution could be to use the SecurityTrimmed control that injects the CSS depending on global user permissions, more information, please refer to
it.
Some similar posts for your reference:
http://social.msdn.microsoft.com/Forums/office/en-US/c2b2d0da-c752-4aea-9c2d-e31a5b1a2988/sharepoint-2010-dynamic-masterpage-based-on-userprofile-property
http://johanleino.wordpress.com/2011/10/20/using-a-different-master-page-for-authenticated-users-in-sharepoint/
http://sharepoint.stackexchange.com/questions/21679/how-can-we-use-a-different-masterpage-for-annoymous-and-authenticated-users
http://sivarajan.me/post/How-to-customize-the-SharePoint-2013-Master-Page-for-Anonymous-Users
Best Regards,
Wendy
Wendy Li
TechNet Community Support

Similar Messages

  • Can't change the master page after upgrading to SharePoint 2013.

    After upgrading our farm to SharePoint 2013 we are having trouble changing the master page for sites that don't have sub-sites. We are still using the v4 UI version, and that appears to be what is causing the problem. The error we get when going to /_layouts/ChangeSiteMasterPage.aspx
    is:
    System.NullReferenceException: Object reference not set to an instance of an object.    at Microsoft.SharePoint.Publishing.Internal.CodeBehind.AreaChromeSettingsPage.OnLoad(EventArgs e)     at System.Web.UI.Control.LoadRecursive()    
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    I took a peek at the source code for AreaChromeSettingsPage.OnLoad and found that it references a CheckBox control that does not exist in the v4 ChangeSiteMasterPage.aspx:
    protected override void OnLoad(EventArgs e)
    base.OnLoad(e);
    this.EnsureChildControls();
    if (!this.Page.IsPostBack)
    this.LoadValues();
    if (base.Web.Webs.Count == 0)
    this.resetSystemMasterPageSubSitesCheckBox.Visible = false;
    this.resetSubSitesCheckBox.Visible = false;
    this.resetAlternateCssSubSitesCheckBox.Visible = false;
    this.resetThemeSubSitesCheckBox.Visible = false;
    base.ConfigureCancelButton(this.BtnCancel);
    If I manually add a checkbox control with the ID "resetThemeSubSitesCheckBox" to a hidden panel in the v4 copy of ChangeSiteMasterPage.aspx the page works, but obviously this is not a best practice. How can we fix this without upgrading the UI version, which
    we are not yet ready to do?

    Thanks Mike - Could you please share what is your next step then? I also have custom master pages and layout but I am going to make new master page and layout in 2013 as we need to change the existing branding too. so, i upgrade the site collection. I understand
    the Look and Feel will not persist after the upgrade but I am concern that at least the page should show the content on the page after the upgrade. The page had Calendar webppart on it but after the upgrade it is coming blank.
    any suggestion?
    Regards,
    Khushi
    Khushi

  • How to change the initial page without open safari

    Hi everybody,
    I have problems opening my safari because of the plugin silverlight. I defined a tvair.swisscom.ch page as initial and it makes an error open it. it means that my safari doesn't work at all.
    i want to know if somebody knows how to change the initial page from safari without open safari and solve this problem.
    thx
    cheers
    nun

    Back up all data before proceeding.
    Triple-click anywhere in the line below on this page to select it:
    ~/Library/Preferences/com.apple.Safari.plist
    Right-click or control-click the line and select
              Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item selected. Quit the application if it's running. Move the selected item to the Trash. Relaunch the application and test. Optionally, restore the file from a backup that predates the problem.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • Click a button to change the Master Page

    Hi everybody,
    I have a LiveCycle Designer question…
    Is it possible to have a button onclick event to change the Pagination “Place” property of a subform?  I would like to change the Master Page that a subform is placed on using a script on an onclick event. I’m not sure if this is possible… wondering if you knew a way…
    Thanks a lot.
    Jing

    Hi Jing,
    I don't think it is easy, here is a sample that allows you to choose the page size and orientation (which are different master pages), Adobe LiveCycle Designer Cookbooks by BR001: Season Planner (or Year Planner) PDF Template
    It effectively defines the form against each master page and recalculates the widths and heights when the page selected is made, but I don't know of another way.
    Regards
    Bruce

  • How to test the JSP pages and sevlets using JUnit. ?

    How to test the JSP pages using JUnit. How to configure what are all the steps to execute the JUnit test cases.

    Hi xiepei,
    since you are using modbus, a simple error checking is implicit in the protocol and is the comparison between returned checksum and the calculated one on the received message: checksum errors, if any, are an effect of communications errors (you should have at least 2 bits changed and on particular patterns to have the checksum be calculated correctly!). You won't be able to calculate BER on them, but you can calculate PER (Packet Error Rate).
    Another flag for communication errors, on the other direction, is to intercept error messages from the device: if it fully implements modbus protocol, it should return some warning in case of error (I seem to remember that in some cases it returns the reveived message with some error bits added: please check in modbus documentation).
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Problem to change the master page height using javascript

    Hi everyone,
    I've been trying it but no luck... appreciate any helps possible.. Thanks!
    I've a masterpage called 'UILayout':
    Long(Height)=100mm, Short(Width)=100mm
    I've a button click event with the script to set the Long to 160mm:
    ====================================
    //display current height
    var curHeight = xfa.form.form1.pageSet.UILayout.medium["long"];
    xfa.host.messageBox("Current Height = " + curHeight);
    //set height to 160mm
    xfa.form.form1.pageSet.UILayout.medium["long"]="160mm";
    //relayout the pageArea
    xfa.layout.relayoutPageArea(0);
    ====================================
    Doesn't work, I wrote another button click event to retrieve the height, and it returned 160mm. But the layout just doesn't refresh with the changed height....i'm using LC Designer 8.2, form saved as Dynamic XML PDF , compability set to 7.0.5, view in Acrobat Pro 7.1. Thanks...

    I do not think you will be able to adjust the Master page size as it is tied to the Content Area size as well. I tried to adjust the pageisze and the content size but it was ignored. I can get at the properties to change them but that is it.

  • How to show the first page and then rest will be created in background

    Dear Friends,
    I am suffering from some seriouse issue of slow opening of report....
    I am using vs2005 and asp.net 2.0 and crXI R2 sp4,
    using oledb for getting data from ms sql server 2005.
    Now my one report called accounts ledger
    when i execute the report query it takes 1.03 mins for 515000 records..no issue with it ,
    when i execute the report from report desginer for 515000 records its taking 26 mins . It is generating all
    32000 pages.
    Now same report i run from my web based erp application it takes 30mins to execute 32000 pages now
    this is too much time it is taking and now our client is fedup of ussss..
    So is there any way that we can show First page at the earliest and rest of the pages willl be getting created in background? is it possible ?
    We have to give them the solution as sson as possible...
    can anyone suggest the diff ways to get out of this problem .......
    Please ur co operation will be appriciated....
    thansk

    Hi Mithun,
    Here are a few points related to performance issue. These might be helpful.
    The performance of a report is related to:
    External factors:
    1. The amount of time the database server takes to process the SQL query.
    ( Crystal Reports send the SQL query to the database, the database process it, and returns the data set to Crystal Reports. )
    2. Network traffics.
    3. Local computer processor speed.
    ( When Crystal Reports receives the data set, it generates a temp file to further filter the data when necessary, as well as to group, sort, process formulas, ... )
    4. The number of records returned
    ( If a SQL query returns a large number of records, it will take longer to format and display than if was returning a smaller data set.)
    Report design:
    1. Where is the Record Selection evaluated?
    Ensure your Record Selection Formula can be translated in SQL, so the data can be filter down on the server, otherwise the filtering will be done in a temp file on the local machine which will be much slower.
    They have many functions that cannot be translated in SQL because they may not have a standard SQL for it.
    For example, control structure like IF THEN ELSE cannot be translated into SQL. It will always be evaluated
    in Crystal Reports. But if you use an IF THEN ELSE on a parameter, it will convert the result of the condition to
    SQL, but as soon as uses database fileds in the conditions it will not be translated in SQL.
    2. How many subreports the report contains and in section section they are located.
    Minimise the number of subreports used, or avoid using subreports if possible because
    subreports are reports within a report, and if you have a subreport in a details section, and the report returns 100
    records, the subreport will be evaluated 100 times, so it will query the database 100 times. It is often the biggest
    factor why a report takes a long time to preview.
    3. How many records will be returned to the report.
    Large number of records will slow down the preview of the reports. Ensure you only returns the necessary data on the report, by creating a Record Selection Formula, or basing your report off a Stored Procedure, or a Command Object that only returns the desired data set.
    4. Do you use the special field "Page N of M", or "TotalPageCount"
    When the special field "Page N of M" or "TotalPageCount" is used on a report, it will have to generate each page
    of the report before it displays the first page, therfore it will take more time to display the first page of the report.
    If you want to improve the speed of a report, remove the special field "Page N of M" or "Total Page Count" or formula that uses the function "TotalPageCount". If those aren't use when you view a report it only format the page requested. It won't format the whole report.
    5. Link tables on indexed fields whenever possible.
    6. Remove unused tables, unused formulas, unused running totals from the report.
    7. Suppress unnecessary sections.
    8. For summaries, use conditional formulas instead of running totals when possible.
    9. Whenever possible, limit records through selection, not suppression.
    10. Use SQL expressions to convert fields to be used in record selection instead of using formula functions.
    For example, if you need to concatenate 2 fields together, instead of doing it in a formula, you can create a SQL Expression Field. It will concatenate the fields on the database server, instead of doing in Crystal Reports.
    SQL Expression Fields are added to the SELECT clause of the SQL Query send to the database.
    11. Using one command as the datasource can be faster if you returns only the desired data set. It can be faster if the SQL query written only return the desired data.
    12. Perform grouping on server
    This is only relevant if you only need to return the summary to your report but not the details. It will be faster as less data will be returned to the reports.
    Regards,
    Shweta

  • How to change the web page title of a web dynpro app?

    Hello,
    I would like to change the HTML page title of a web dynpro application without renaming the application component itself - but how?
    Thanks for your comments!

    Hi M Walter,
    Assuming you are using Web Dynpro Java, you can change the title of the Web Page for Web Dynpro App by adding the title to the main window of your app.
    Go to Windows and open the properties. There will be a field called 'title'. Give the title you want, save, build, DC->Build and deploy.
    The title you gave to this Window will be displayed as the title of your Web page.
    Regards,
    Ajay

  • How to change the code page on windows 2008 r2 ?

    How do I configure a specific code page on windows 2008 r2 ?
    I understand that I can go into control panel and change regional settings but if  want to change the code page from one codege to say CP850 how do i do that ?.
    There is no option in the control panel to select  code page ?
    Thanks

    Hi,
    I have followed the below steps which did not cause any issue to my server. Have a full latest backup and then follow the below steps.
    Create a start up batch file that includes all the commands you want.
    Then edit the registry to point to your start up file.
    http://technet.microsoft.com/en-us/library/cc779439%28WS.10%29.aspx
    c:\startup.cmd
    @echo off
    chcp 437
    HKLM\SOFTWARE\Microsoft\Command Processor
    AUTORUN="C:\startup.cmd"
    Thanks,
    Umesh.S.K

  • How to change the button image in theme editor

    How can i change the button image in theme editor. If i upload another button image in theme editor it doesn't show me the full image. it cuts it from the right. how can i view  the full image as a button.
    Thanks

    HI,
      Check this link
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/ep/modifying%252bthe%252blogon%252bpage
    Custom logon page
    Portal Customizations Intro - Login Part 1
    Change the portal logon page image programmatically
    Branding
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a000df6b-586a-2910-e6be-9fee831d5a30
    Thanks,
    Gopi

  • How to change the default look and feel

    Hi.
    Does anyone knows how to change the default Caspian look and feel to, for example, Nimbus ?
    Or the skin feature turns look and feel setting, as We know in java, unnecessary in javafx ?
    I´m using javafx 1.2.
    Cheers

    Canspian is not a look&feel, it's a skin.
    Look&feel only change the SwingComponent,
    regards.

  • How to change the font size and style on run time

    dear all
    i try to change the font style and font size on runtime. I did the following:
    1- i created an item(:font_size) in which i will write the size of the font for the the other item ('customer_name')
    2 on the post_change trigger for 'font_size' i write this code
    SET_ITEM_PROPERTY('customer_name',FONT_size,(:font_size);
    i write 12 then then font size changed , then i write 18 , the size does not change. and when i write any value , no change happens. I do not know why
    the second problem is how to change the font style
    i made three checkbooks (bold,italic,underline)
    on the trugger when_checkbox_checked i write
         IF :BOLD = 'B' THEN
         SET_ITEM_PROPERTY('N_SAMPLE',FONT_STYLE,'BOLD');
         ELSE
    SET_ITEM_PROPERTY('N_SAMPLE',FONT_STYLE,'REGULAR');
         END IF;     
    no change happend at all.
    please help

    Hi friend,
    it's a really really strange tip... May be it's a Forms bug? I've tried with set_item_property..and.. you're right, it doesn't work..
    So.. you can try making this:
    - create a visual attribute with an specific font size....
    - use the
    SET_ITEM_INSTANCE_PROPERTY('block.item',CURRENT_RECORD,VISUAL_ATTRIBUTE,'you_visual_attribute');
    and call it from psot-change....
    It works
    Hope it helps,
    Jose.

  • How to change the logon page text colour?

    Hi experts,
       I need to do 4 changes in the logon screeen
    1.the "user name" and "password " to "User Id" and "Pass".I have changed this in "umelogonbase.jar".
    2.Change the colour of the two texts(white colour)
    3.with black as background for the userid and pass label and textfield in the left side of the page
    4.Also the background of the screen of the logon page with a company pic ;
    I am following the below
    http://wiki.sdn.sap.com/wiki/display/EP/ModifyingtheLogon+Page
    Kindly help in this
    Naga

    When you follow the steps outlined at the Wiki page, what exactly is where you receive an error? You'll have to change the JSP page of the logon to insert your changes. Have you done this and the changes are not reflected?
    br,
    Tobias

  • How to change the full host and domain name on OS X Leopard...

    I recently bought an iMac, and I'm trying to configure it for my network. The question I have is, how can I change the host name and domain name from Skuld.local to skuld.tolharadys.net?
    After mucking around with a few searches on Google, I've gotten the domain name to stick since running domainname returns tolharadys.net. Also I can change the hostname as reported by 'hostname' temporarily by running 'hostname skuld.tolharadys.net' in Terminal.app. However, this isn't persistent after reboots. Ideas are welcome.

    You would need a DNS server on your network configured to answer authoritatively for that particular subdomain.

  • How to change the print page setup in IE using javascript

    dear all,
    I want to take print out envelope paper size, so i want to chnage the page setup in IE
    i want to change the print page setup in IE using javascript

    I think, you can do this using CSS.
    http://support.sas.com/rnd/base/ods/templateFAQ/Template_csstyle.html

Maybe you are looking for