How can a PopUp get the styles from the main page? - sharepoint

I have a PopUp opened by
SP.UI.ModalDialog.showModalDialog
but the content of this Pop Up hasn't any styles of the Sharepoint Portal. (It hasn't access to javascript of the main page, too). It seems that is because SP uses iframes to open it.
How can the Pop Up get the styles from the main page?

SharePoint modal dialogs use the same MasterPage as the Portal. Most of the styles are hidden using CSS tag i.e. s4-notdlg. If you search for this tag under master page, any styles under this will not be displayed on Modal Dialog.
You should either create PopupMaster.master for your popup pages, as modifying this tag will also effect Modal Dialogs used by SharePoint by default. Or you can also create a custom Master Page for Portal and modify as per your need.

Related

How to edit content of aspx SharePoint page programmatically?

There are so many page layouts with same content inside. I need to remove some of the content from these pages through c#.
For example page layouts contain:
<%# Register tagprefix="xyz" namespace="abcd" assembly =abcd, version= 16.0.0.0, publickeytoken =713567888>
I need to remove this content from all the page layouts. Manually editing each and every page layout is very difficult. As I am not a techie , could you please help me here?
I think you are trying to edit the Master Pages of the SharePoint sites. You can view the Master Page from
http://Sharepoint_Site_Name/_layouts/15/DesignMasterPages.aspx
You can also view them from the SharePoint Designer by opening a site and opening the "Master Pages" menu from the left hand side.

Create Template Page in Sharepoint 2013

I am unable to create template page in sharepoint 2013.
Is there a way to do so ?
Thank You !
To create a page layout:
Browse to your publishing site.
In the upper-right corner of the page, choose the gear icon, and then choose Design Manager.
In Design Manager, in the left navigation pane, choose Edit Page Layouts.
Choose Create a page layout.
In the Create a Page Layout dialog box, enter a name for your page layout.
Select a master page.
The master page that you choose here will be shown in the preview for this page layout. This master page also determines what content placeholders get added to the page layout.
Note
After you choose this master page, you cannot preview the page layout with a different master page, even after you apply a different master page to the live site.
Select a content type. The content type for this page layout determines what page fields will be available for this page layout in the Snippet Gallery.
Choose OK.
At this point, SharePoint creates an HTML file and an .aspx file with the same name. In Design Manager, your HTML file now appears with a Status column that shows one of two possible statuses:
Warnings and Errors
Conversion successful
Click the link in the Status column to preview the file and to view any errors or warnings about the master page.
The preview page is a live server-side preview of your page layout. The top of the preview displays any warnings or errors that you may have to resolve by editing the HTML file in an HTML editor. Errors must be fixed before the preview will display the page layout correctly.
The preview page also contains a Snippets link in the upper-right corner. This link opens the Snippet Gallery, where you can begin replacing mockup controls in your design with dynamic SharePoint controls.
To fix any errors, edit the HTML file that resides directly on the server by using an HTML editor to open and edit the HTML file in the mapped drive. Each time you save the HTML file, any changes are synced to the associated .aspx file.
The preview of the page layout shows the page fields that were added automatically to the page layout. These page fields are site columns that are unique to the current content type. Now you are ready to style the page layout according to your original HTML mockups.
Source

SP2013 - Adding a Content Editor web part to a custom layout page

In sharepoint 2013, I have 2 custom layout pages:
1 associated with Content Type = Article Page, and
1 associated with Content Type = Welcome Page.
I add a Web Part zone to both layout pages.
I create a web page from either layout page.
When I edit the web page to fill in the Web Part zone, no Web Part zone appears and this appears in its place: $Resources:core,ContentEditorWebPartTitle;
Any clues?
Thanks.
I'm adding the steps of my process hoping that may make things clearer:
access desired site.
went to Design Manager
clicked "Edit Page Layouts"
clicked desired custom page layout
clicked "Snippets"
clicked "Web Parts / Media and Content"
clicked "Content Editor"
clicked "Copy to Clipboard"
then
opened custom page layout (.html) in Sharepoint Designer 2013
copied the clipbboard contents within the "asp:ContentPlaceHolder" tags
saved
then
returned to browser
went back to "Design Manager"
and "Publish a Major Version" of the custom layout page
then
clicked "Add a Page"
goto "Page" tab
click "Page Layout"
select my custom layout page
then scroll to examine my new page (while in "Edit" mode)
result
I see the text "$Resources:core,ContentEditorWebPartTitle;",
but no box for adding content.
Thanks
Im new to Sharepoint myself, but this sounds like your snippet might be wrong. If you can access the snippet manager, how to do this is on MSDN SharePoint 2013 Design Manager snippets.
Then what you want to do is create the snippet using the snippet manager, try the Content Editor inside the Media and Content section, you can then add this to your MasterPage inside the MainContent user control.
You could try adding this snippet to your PageLayout.html instead of MasterPage.html in place of the current web part thats failing, to see if that works.
Remove the web part zones from your layout pages.
Open the layout page in design manager and navigate to snippet manager.
Copy the snippet for web part zone and place them in the layout as desired.
Publish the layout.
Hope this will help to resolve your issue
Your problem is on Step#10 you should put your code inside the following tag:
asp:ContentPlaceHolder ID="PlaceHolderMain" runat="server"

InfoPath 2013 web form doesn't open the browse dialog in the people picker control

I have a user picker control, which when used in preview mode open a dialog to find users when I click on the browse button,
but do nothing when deployed on the SharePoint server.
If i type a user in the input box, the check names button is working and provide multiple choice when it's the case.
As the people picker control was modified in the new SharePoint 2013, could it be a side effect ?
Does anyone have the same problem ?
It worked once I enabled the ribbon in the form options.
Form Options -> Web Browser -> checked Show InfoPath commands in Ribbon or toolbar
Finally got the solution when you disable the ribbon the the browse button is also disabled to overcome this problem
Create a new blank page or a wiki page.
Insert a InfoPath Form WebPart and link this webPart to the desired form.
Now after doing all the changes you can see that the form gets loaded and when you click the browse button it should function normally.
If you want the same look of the form as it is when you open in it in new page or a tab, use a CEWP and add styles to disable unwanted controls like the navigation menus, search bar etc.,

How to get Site Icon to properly update in Sharepoint 2010 Web Part Page

I'm working on creating a reusable and extensible web application in SharePoint 2010. I've created a master page to apply across all pages in the site. However, whenever I create a web part page and navigate to it, the site icon does not display. Instead of my custom site icon being displayed it shows the default SharePoint icon. I can get around this by placing the icon directly into the master page, but that would require me to create a new master page if I ever wanted to extend this web application.
Does anyone know why this is happening? My initial thought was that the web part page had somehow been customized to not use the default master page, but that does not seem to be the case: if I update the master page it is reflected in the web part page.
Googling around and checking this site yielded little answers. I only found one post out there that reported the same issue I am observing but there was no solution.
If it helps, I did notice one phenomena when navigating to this page. Before the page completely loads, the correct site icon appears for a split second before being replaced with the default site icon. Hope that helps.
I ran into the same issue this morning and didn't want to create a custom master page just for this, but luckily it was quickly resolved by following admlcrunch's suggestion (on SharePoint 2010):
Go to the desire page
Click on the "Page" tab at the top
Click on the "Title Bar Properties" at the right (in the ribbon)
In the Image Link section on the right, paste in the image URL
Click OK
The only bad thing about this is, you have to update every Web Part page that you want custom icon image to display.
I was just having the same issue. Web Part Pages have their own icon that you can set.
To set the icon click Page > Title Bar Properties. This will open the Web Part Page Title Bar dialog. In this dialog there is an area to set the Image Link. You can set the icon here. I just copied the URL to the site icon.
Open the page in designer and remove the custom titlebar place holder:
[WebPartPages:TitleBarWebPart]
from the :
[asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea"]

Resources