To get sharepoint master page to look
From:
To:
You can download the master page here, or you can follow the steps below:
here are the steps involved:
Step 1:
In the master page, set the style sheet with the following css style below:
/* Aligns the Top Bars */
.ms-cui-ribbonTopBars, #s4-titlerow,#contentBox {width: 960px !important;margin-left:auto !important;margin-right:auto !important;} /* Turns off the border on the bottom of the tabs */
.ms-cui-ribbonTopBars > div {border-bottom:1px solid transparent !important;}
And sharepoint site should look like:
Step 2:
Then add the following css:
.ms-core-sideNavBox-removeLeftMargin{
display:none;
}
And sharepoint site should look like:
Step 3:
Then we need to cut the following tag and the elements within the tags, and move them above the dashboard tag which is <SharePoint:DeveloperDashboard runat="server" />:
<wssuc:Welcome> tag
<span class="ms-siteactions-root" id="siteactiontd"> tag
<span id="ms-help"> tag
And sharepoint site should look like:
Tuesday, 18 March 2014
SharePoint 2013 Rest api
SharePoint rest api gives user flexibility to retrieve data via URL.
Not only can this be used in development, but also can be used for debugging, such as, checking if list item data is returning from sharepoint list.
This is a whole new approach in comparison to sharepoint 2007, where rest service was not available, and only invoking web service methods were possible.
Below format of calling a sharepoint
http://(sharepoint site url)/_api/lists/getbytitle('<sharepoint list name>')/items
Replace <sharepoint list name> with the sharepoint list name.
for example,
if sharepoint site url = http://www.metadatadescription.com/
and sharepoint list name = AnnouncementCategory
then rest api url is:
http://www.metadatadescription.com/_api/lists/getbytitle('AnnouncementCategory')/items
Not only can this be used in development, but also can be used for debugging, such as, checking if list item data is returning from sharepoint list.
This is a whole new approach in comparison to sharepoint 2007, where rest service was not available, and only invoking web service methods were possible.
Below format of calling a sharepoint
http://(sharepoint site url)/_api/lists/getbytitle('<sharepoint list name>')/items
Replace <sharepoint list name> with the sharepoint list name.
for example,
if sharepoint site url = http://www.metadatadescription.com/
and sharepoint list name = AnnouncementCategory
then rest api url is:
http://www.metadatadescription.com/_api/lists/getbytitle('AnnouncementCategory')/items
SPServices Extension
SP Service extension, is a extension to SP Services javascript library, and can be used more easily to debug javascript.
For example, if we had a sharepoint list called, 'AnnouncementCategory'. Then in google chrome console, we would just type in the following the retrieve the iteams in AnnouncementCategory list:
DEBUG_SPHelper.get_all_spList_items_as_XML('AnnouncementCategory')
This tool is really handy for simple queries. some of the functions are:
DEBUG_SPHelper.does_splist_exist(spListName)
DEBUG_SPHelper.add_splist(spListName, optusListDescription, optusListTemplateID)
DEBUG_SPHelper.get_splist_description(spListName)
DEBUG_SPHelper.get_splist_items_as_XML(spListName, CAMLQuery)
DEBUG_SPHelper.get_all_spList_items_as_XML(spListName, camlViewFields)
DEBUG_SPHelper.update_spList_new_fields(spListName, spNewfields)
DEBUG_SPHelper.batch_to_spList_item(spListName, batchCommand)
DEBUG_SPHelper.get_spList(spListName)
DEBUG_SPHelper.get_spList_fields(spListName)
DEBUG_SPHelper.get_spView_collection(spListName)
DEBUG_SPHelper.get_spView_GUID(spListName, spViewName)
DEBUG_SPHelper.update_spView(spListName, spViewName, spViewFields)
DEBUG_SPHelper.does_fields_in_spList_exist(spListName, spListFields)
DEBUG_SPHelper.get_array_from_XML(xmlData, arrayColumns)
DEBUG_SPHelper.CAML_new_item_batch(fieldNamesAndValues)
DEBUG_SPHelper.CAML_update_item_batch(listItemID, fieldNamesAndValues)
DEBUG_SPHelper.CAML_delete_item_batch(listItemID)
DEBUG_SPHelper.add_fields_to_spListView(spListName, spViewName, fieldsArray)
DEBUG_SPHelper.get_object_from_XML(xmlData, arrayColumns)
DEBUG_SPHelper.does_object_contain_items(objList)
Here are the steps below to get DEBUG_SPHelper working:
Step 1:
download SPServices, and download sharepoint-helper.js, and upload that file to the required SharePoint site.
Step 2:
Using sharepoint designer, add the link reference in the master page.
Remember:
JQuery file and SPServices javascript file has to be linked first in scripts before sharepoint-helper javascript file.
Step 3:
Open google chrome console, and type in the following:
DEBUG_SPHelper.get_all_spList_items_as_XML('<your sharepoint list name>')
Please replace <your sharepoint list name> with the sharepoint list name you want to query:
DEBUG_SPHelper.get_all_spList_items_as_XML('AnnouncementCategory')
For example, if we had a sharepoint list called, 'AnnouncementCategory'. Then in google chrome console, we would just type in the following the retrieve the iteams in AnnouncementCategory list:
DEBUG_SPHelper.get_all_spList_items_as_XML('AnnouncementCategory')
This tool is really handy for simple queries. some of the functions are:
DEBUG_SPHelper.does_splist_exist(spListName)
DEBUG_SPHelper.add_splist(spListName, optusListDescription, optusListTemplateID)
DEBUG_SPHelper.get_splist_description(spListName)
DEBUG_SPHelper.get_splist_items_as_XML(spListName, CAMLQuery)
DEBUG_SPHelper.get_all_spList_items_as_XML(spListName, camlViewFields)
DEBUG_SPHelper.update_spList_new_fields(spListName, spNewfields)
DEBUG_SPHelper.batch_to_spList_item(spListName, batchCommand)
DEBUG_SPHelper.get_spList(spListName)
DEBUG_SPHelper.get_spList_fields(spListName)
DEBUG_SPHelper.get_spView_collection(spListName)
DEBUG_SPHelper.get_spView_GUID(spListName, spViewName)
DEBUG_SPHelper.update_spView(spListName, spViewName, spViewFields)
DEBUG_SPHelper.does_fields_in_spList_exist(spListName, spListFields)
DEBUG_SPHelper.get_array_from_XML(xmlData, arrayColumns)
DEBUG_SPHelper.CAML_new_item_batch(fieldNamesAndValues)
DEBUG_SPHelper.CAML_update_item_batch(listItemID, fieldNamesAndValues)
DEBUG_SPHelper.CAML_delete_item_batch(listItemID)
DEBUG_SPHelper.add_fields_to_spListView(spListName, spViewName, fieldsArray)
DEBUG_SPHelper.get_object_from_XML(xmlData, arrayColumns)
DEBUG_SPHelper.does_object_contain_items(objList)
Here are the steps below to get DEBUG_SPHelper working:
Step 1:
download SPServices, and download sharepoint-helper.js, and upload that file to the required SharePoint site.
Step 2:
Using sharepoint designer, add the link reference in the master page.
Remember:
JQuery file and SPServices javascript file has to be linked first in scripts before sharepoint-helper javascript file.
Step 3:
Open google chrome console, and type in the following:
DEBUG_SPHelper.get_all_spList_items_as_XML('<your sharepoint list name>')
Please replace <your sharepoint list name> with the sharepoint list name you want to query:
DEBUG_SPHelper.get_all_spList_items_as_XML('AnnouncementCategory')
Monday, 17 March 2014
SharePoint Foundation - Add Master Page to Subsite
In SharePoint foundation, one way to move master page from site collection to subsite is to download the master page from site collection and upload that master page to the subsite.
site collection master page look and feel:
original subsite master page look and feel:
Here are the steps to achieve set the subsite master page from site collection master page.
Step 1:
In site collection, click on Site Actions > Site Settings > Master Pages (This link will go to Master Page Gallery)
Step 2:
Download the master page that is used in the site collection.
Step 3:
Go to subsite master page gallery
Step 4:
In the ribbon, click on Files > Upload Document > Then browse and upload the site collection master page > Ok
Step 5:
Leave the default settings, and click Save
Now the master page is uploaded
Step 6:
Go to SharePoint Designer and open subsite. Then click on Master Pages, and select site collection master page (that was uploaded), then right click the master page, and then click:
Set as Default Master Page
and, Set as Custom Master Page
Now go to subsite, and the site collection master page should be applied to the subsite master page
site collection master page look and feel:
original subsite master page look and feel:
Here are the steps to achieve set the subsite master page from site collection master page.
Step 1:
In site collection, click on Site Actions > Site Settings > Master Pages (This link will go to Master Page Gallery)
Step 2:
Download the master page that is used in the site collection.
Step 3:
Go to subsite master page gallery
Step 4:
In the ribbon, click on Files > Upload Document > Then browse and upload the site collection master page > Ok
Step 5:
Leave the default settings, and click Save
Now the master page is uploaded
Step 6:
Go to SharePoint Designer and open subsite. Then click on Master Pages, and select site collection master page (that was uploaded), then right click the master page, and then click:
Set as Default Master Page
and, Set as Custom Master Page
Now go to subsite, and the site collection master page should be applied to the subsite master page
Subscribe to:
Posts (Atom)