This document provides instructions for creating a custom site definition in Microsoft Windows SharePoint Services. It includes 4 exercises:
1. Copying the default site definition and modifying the site definition XML file to reference the new custom definition.
2. Modifying the menu bar for sites created with the custom definition.
3. Adding custom client-side script commands to the user interface.
4. Creating a new site based on the custom site definition.
The goal is to learn how to customize specific appearances and behaviors for sites created with a new custom site definition in Windows SharePoint Services.
The 2nd Biennial Engaging Immigrant Entrepreneurs & Small Business Owners ForumAllentza Michel
Featuring presentations from:
- Alvaro Lima, Director of Research, Boston Redevelopment Authority
- Alberto Calvo, President of Stop & Compare Supermarkets & Chair of Social Capital Inc.
- Alexa Marin, Economic Justice Fellow, Lawyers' Committee for Civil Rights
- Norman Eng, Economic Development Specialist/Public Information Officer, Small Business Administration
- Karleen Porcena, Program Officer, Boston Local Initiatives Support Corporation*
- Cisnell Baez, Program Manager, Family Independence Initiative
- José Luis Rojas Villareal, Community Group Manager, Mass Growth Capital Corporation
- Denzil Mohammed, Director of Public Education, Immigrant Learning Center
- Janin Duran, Director of Entrepreneurship for All's Spanish Program
* Slides not available at this time
The 2nd Biennial Engaging Immigrant Entrepreneurs & Small Business Owners ForumAllentza Michel
Featuring presentations from:
- Alvaro Lima, Director of Research, Boston Redevelopment Authority
- Alberto Calvo, President of Stop & Compare Supermarkets & Chair of Social Capital Inc.
- Alexa Marin, Economic Justice Fellow, Lawyers' Committee for Civil Rights
- Norman Eng, Economic Development Specialist/Public Information Officer, Small Business Administration
- Karleen Porcena, Program Officer, Boston Local Initiatives Support Corporation*
- Cisnell Baez, Program Manager, Family Independence Initiative
- José Luis Rojas Villareal, Community Group Manager, Mass Growth Capital Corporation
- Denzil Mohammed, Director of Public Education, Immigrant Learning Center
- Janin Duran, Director of Entrepreneurship for All's Spanish Program
* Slides not available at this time
If you’re tired of running the same commands over and over when setting up your servers, you’ll love Chef. It’s a systems integration framework that allows you to use a Ruby DSL to manage your system configurations, and then easily deploy them across your entire infrastructure, à la Capistrano. Tyler will be breaking down the various components of Chef, and showing some example configurations to get you cooking.
Introduction Dojo Toolkit & IBM Lotus DominoRolf Kremer
This presentation shows an introduction to the usage of the dojo toolkit in an IBM Lotus Domino application. The presentation based on a three hour workshop in which the sample application 'Phone Directory' was developed.
Salesforce Admin's guide : the data loader from the command lineCyrille Coeurjoly
Hacks, Habits and Helpful Hints : The salesforce Admin's reference guide. This short guide explain how to use the salesforce data loader in a command line; No more clics, no more errors.
Similar to Creating%20a%20 Custom%20 Site%20 Definition%20for%20 Microsoft%20 Windows%20 Share Point%20 Services (20)
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
1. Creating a Custom Site
Definition for Microsoft
Windows SharePoint
Services
2. Table of Contents
Creating a Custom Site Definition for Microsoft Windows SharePoint Services ..... 1
Exercise 1 Creating a Windows SharePoint Services Site Definition .................................................................2
Exercise 2 Modifying the Menu Bar for a SharePoint Site....................................................................................5
Exercise 3 Adding Custom Client-side Script Commands....................................................................................6
Exercise 4 Create a New Site Based on the Custom Definition ..........................................................................9
3. Creating a Custom Site Definition for Microsoft Windows SharePoint Services
Creating a Custom Site Definition for
Microsoft Windows SharePoint Services
After competing this lab, you will be able to:
Objectives Create a Windows SharePoint Services site definition
Modify the site's menu bar
Add custom commands to the user interface
Create a new site based on the custom site definition
The purpose of this lab is to learn how to create a new Windows SharePoint
Scenario Services site definition, and how to customize specific appearances and
behaviors for sites created using this new site definition.
Estimated Time to 60 Minutes
Complete This Lab
Page 1 of 9
4. Creating a Custom Site Definition for Microsoft Windows SharePoint Services
Exercise 1
Creating a Windows SharePoint Services Site Definition
Scenario
In this exercise, you will learn how to create a new global site definition. The easiest, most reliable way to
do so is to copy an existing site definition and edit it.
Tasks Detailed Steps
1. Connect to the a. Click inside the virtual machine window.
virtual machine b. Press Right-ALT + DEL.
c. Logon as Administrator to the CONTOSO domain with the password
pass@word1.
2. Copy the default a. Double click the Jeff Teper.RDP remote desktop connection on the desktop.
definition b. Enter the password pass@word1 if promoted. The Warm Up Demo script will
run. This will take a few minutes. Please wait for it to finish and close.
c. Minimize Internet Explorer. If the Contoso SharePoint page does not load up,
click the Home icon, then minimize.
d. On the desktop, double click My Computer and navigate to C:Program
FilesCommon FilesMicrosoft Sharedweb server
extensions60TEMPLATE1033.
e. Right-click the STS directory and click Copy.
f. Click Edit | Paste.
g. Right click on the Copy of STS directory and click Rename. Type FOO to
rename the directory and click in the white space in the folder.
3. Copy the definition a. Double-click the XML directory to open it.
instruction file b. Right click on the WEBTEMP.XML file and click Copy.
c. Click Edit | Paste.
d. Right click on the Copy of WEBTEMP.XML file and select Rename. Type
WEBTEMPFOO.XML to rename the file.
4. Edit the definition a. Right-click the WEBTEMPFOO.XML file and choose Edit with Visual Studio
file .NET 2003.
The WEBTEMP.XML file b. Highlight the following text (the MPS template section) and press DELETE:
contains references to all of the
<Template Name=quot;MPSquot; ID=quot;2quot; >
standard site definitions included
<Configuration ID=quot;0quot; Title=quot;Basic Meeting Workspacequot;
with Windows SharePoint
Hidden=quot;FALSEquot; ImageUrl=quot;/_layouts/images/mwsprev.pngquot;
Services. We only need to keep
one of the entries in Description=quot;All the basics to plan, organize and track
WEBTEMPFOO.XML, so the your meeting. This Meeting Workspace contains the
rest of the entries need to be following lists: Objectives, Attendees, Agenda, and
removed.
Document Library.quot;> </Configuration>
<Configuration ID=quot;1quot; Title=quot;Blank Meeting Workspacequot;
Hidden=quot;FALSEquot; ImageUrl=quot;/_layouts/images/mwsprev.pngquot;
Description=quot;A blank Meeting Workspace for you to
customize based on your requirements.quot;> </Configuration>
<Configuration ID=quot;2quot; Title=quot;Decision Meeting
Page 2 of 9
5. Creating a Custom Site Definition for Microsoft Windows SharePoint Services
Tasks Detailed Steps
Workspacequot; Hidden=quot;FALSEquot;
ImageUrl=quot;/_layouts/images/mwsprev.pngquot; Description=quot;A
Meeting Workspace in which to review relevant documents
and record decisions. This Meeting Workspace contains the
following lists: Objectives, Attendees, Agenda, Document
Library, Tasks, and Decisions.quot;> </Configuration>
<Configuration ID=quot;3quot; Title=quot;Social Meeting Workspacequot;
Hidden=quot;FALSEquot; ImageUrl=quot;/_layouts/images/mwsprev.pngquot;
Description=quot;A planning tool for social occasions,
featuring a discussion board and a picture library to post
pictures of the event. This Meeting Workspace contains the
following lists and Web Parts: Attendees, Directions,
Image/Logo, Things To Bring, Discussions, and Picture
Library.quot;> </Configuration>
<Configuration ID=quot;4quot; Title=quot;Multipage Meeting
Workspacequot; Hidden=quot;FALSEquot;
ImageUrl=quot;/_layouts/images/mwsprev.pngquot; Description=quot;All
the basics to plan, organize and track your meeting with
multiple pages. This Meeting Workspace contains the
following lists: Objectives, Attendees and Agenda in
addition to two blank pages for you to customize based on
your requirements.quot;> </Configuration>
</Template>
c. Highlight the line that begins with the following text and press DELETE:
<Configuration ID=quot;1quot; Title=quot;Blank Sitequot;
d. Highlight the line that begins with the following text and press DELETE:
<Configuration ID=quot;2quot; Title=quot;Document Workspacequot;
e. Find the following line of text, highlight the name STS and press DELETE:
<Template Name=quot;STSquot; ID=quot;1quot;>
f. In its place, type FOO (the same name as you gave the directory you created
above).
g. In the same line of text, highlight the numeral 1 and press DELETE:
h. In its place, type the number 97.
i. Find the configuration line that begins with the following text:
<Configuration ID=quot;0quot; Title=quot;Team Sitequot;
j. Highlight the word Team Site and press DELETE. In its place, type FOO Site
k. The file should now look like this:
<?xml version=quot;1.0quot; encoding=quot;utf-8quot; ?>
<!-- _lcid=quot;1033quot; _version=quot;11.0.5510quot; _dal=quot;1quot; -->
<!-- _LocalBinding -->
<Templates xmlns:ows=quot;Microsoft SharePointquot;>
<Template Name=quot;FOOquot; ID=quot;97quot;>
<Configuration ID=quot;0quot; Title=quot;Team Sitequot; Hidden=quot;FALSEquot;
ImageUrl=quot;/_layouts/images/stsprev.pngquot; Description=quot;This
template creates a site for teams to create, organize, and
share information quickly and easily. It includes a
Document Library, and basic lists such as Announcements,
Events, Contacts, and Quick Links.quot;> </Configuration>
</Template>
</Templates>
l. Click File | Save All.
Page 3 of 9
6. Creating a Custom Site Definition for Microsoft Windows SharePoint Services
Tasks Detailed Steps
m. Click File | Exit.
5. Restart IIS a. Click Start | Run.
b. In the Run dialog, type IISRESET /timeout:120 and press ENTER. Wait for the
popup window to close.
Page 4 of 9
7. Creating a Custom Site Definition for Microsoft Windows SharePoint Services
Exercise 2
Modifying the Menu Bar for a SharePoint Site
Scenario
In this exercise, you will learn how to modify the menu bar (the HTML menu that appears at the top of all pages) for
sites created from a your new custom site definition.
Tasks Detailed Steps
6. Open the site a. In Windows file explorer, navigate to C:Program FilesCommon
definition file FilesMicrosoft Sharedweb server
extensions60TEMPLATE1033FOOXML.
b. Right-click the file ONET.XML and click Edit with Visual Studio .NET 2003.
7. Add a link to My a. Locate the NavBars section in the ONET.XML file. It begins with the following
Site text:
<NavBars>
b. Locate the NavBar named SharePoint Top Navbar. It is the line that begins with
the following text:
<NavBar Name=quot;SharePoint Top Navbarquot;
c. On a new blank line beneath the line you just located, create a new node in the
SharePoint Top Navbar by typing the following text:
<NavBarLink Name=quot;My Sitequot; Url=quot;/MySitequot;> </NavBarLink>
d. Click File | Save All.
8. Restart IIS a. Click Start | Run.
b. In the Run dialog, type IISRESET /timeout:120 and press ENTER. Wait for the
popup window to close.
Page 5 of 9
8. Creating a Custom Site Definition for Microsoft Windows SharePoint Services
Exercise 3
Adding Custom Client-side Script Commands
Scenario
In this exercise, you will learn how to configure custom client side scripts for the item menu. This setting is applied
at site creation time, so you will not modify the behavior of existing sites.
Tasks Detailed Steps
9. Add the a. In Visual Studio, find the Project element that begins with the following text:
CustomJSUrl <Project Title=quot;Team Web Sitequot;
parameter to new b. Place the cursor at the end of the element, immediately before the final > and press
sites SPACEBAR.
c. Type the following text in a single line to add an attribute to the node:
CustomJSUrl=quot;/_layouts/[%=System.Threading.Thread.CurrentT
hread.CurrentUICulture.LCID%]/new_ows.jsquot;
d. When you are done, the full line should look something like this:
<Project Title=quot;Team Web Sitequot; ListDir=quot;Listsquot;
xmlns:ows=quot;Microsoft SharePointquot; CustomJSUrl=quot;/_layouts/
[%=System.Threading.Thread.CurrentThread.CurrentUICulture.
LCID%]/new_ows.jsquot;>
e. Click File | Save All.
f. Click File | Exit.
10. Restart IIS a. Click Start | Run.
b. In the Run dialog, type IISRESET /timeout:120 and press ENTER. Wait for the
popup window to close.
11. Create the a. Return to the file explorer and navigate to C:Program FilesCommon
new_ows.js file FilesMicrosoft Sharedweb server
extensions60TEMPLATELAYOUTS1033.
The command list for a
document in a document library b. Click File | New | Text Document.
is populated with custom JScript
c. Type new_ows.js and press ENTER. Click Yes when prompted.
commands. You just instructed
the site definition to have all sites d. Right-click on the newly-created new_ows.js file and click Edit with Visual
created based on it reference an Studio .NET 2003.
additional JScript file named
e. Add the following JScript code to the file:
new_ows.js.
function AddCheckinCheckoutMenuItem(m, ctx, url)
This file need s to be created,
and it must contain functions to {
manipulate the command list and if (currentItemCheckedOutUserId == null)
to react to the user choosing the
{
new custom command.
currentItemCheckedOutUserId = itemTable.COUId;
The command we will add will
}
pass the filename to a new
if (currentItemCheckedOutUserId != quot;quot;)
ASP.NET page that checks out a
{
file and immediately issues a
strDisplayText = L_Checkin_Text;
HTTP GET that downloads it to
the user's local PC. strAction = quot;NavigateToCheckinAspx('quot; + ctx.HttpRoot
+ quot;', 'FileName=quot; + url + quot;')quot;;
strImagePath = ctx.imagesPath + quot;checkin.gifquot;;
CAMOpt(m, strDisplayText, strAction, strImagePath);
}
Page 6 of 9
9. Creating a Custom Site Definition for Microsoft Windows SharePoint Services
Tasks Detailed Steps
else
{
strDisplayText = L_Checkout_Text;
strAction = quot;NavigateToCheckinAspx('quot; + ctx.HttpRoot
+ quot;', 'FileName=quot; + url + quot;&Checkout=true')quot;;
strImagePath = ctx.imagesPath + quot;checkout.gifquot;;
CAMOpt(m, strDisplayText, strAction, strImagePath);
if (ctx.listTemplate == 101)
{
strAction = quot;CheckOutAndDownload('quot; +
ctx.HttpRoot + quot;', 'FileName=quot; + url + quot;&Checkout=true')quot;;
CAMOpt(m, quot;Check Out & Downloadquot;, strAction,
strImagePath);
CAMSep(m);
}
}
}
function CheckOutAndDownload(strHttpRoot, strArgs)
{
window.onfocus = RefreshOnNextFocus;
SubmitFormPost(strHttpRoot + quot;/_layouts/quot; +
L_Language_Text + quot;/CheckOutAndDownload.aspx?quot; + strArgs +
quot;&Source=quot; + GetSource());
}
f. Click File | Save All.
g. Click File | Exit.
12. Create the ASPX a. In Windows file explorer, navigate to C:Program FilesCommon
page used by the FilesMicrosoft Sharedweb server
custom Check Out extensions60TEMPLATELAYOUTS1033.
and Download b. Click File | New | Text Document.
function
c. Type CheckOutAndDownload.aspx and press ENTER. Click Yes when
The custom JScript function prompted.
CheckOutAndDownload will
send the user's browser to an d. Double-click on the CheckOutAndDownload.aspx file to open it for editing in
ASP.NET page named Visual Studio .NET.
CheckOutAndDownload.aspx. It
e. Add the following code to the file:
will pass the document's URL as
<%@ Page language=quot;C#quot; EnableViewStateMac=quot;falsequot; %>
a parameter so the page can do
two things that normally involve <%@ Register Tagprefix=quot;SharePointquot;
separate steps in Windows Namespace=quot;Microsoft.SharePoint.WebControlsquot;
SharePoint Services, checking Assembly=quot;Microsoft.SharePoint, Version=11.0.0.0,
out the file and downloading it to
Culture=neutral, PublicKeyToken=71e9bce111e9429cquot; %>
one's local computer.
<%@ Import Namespace=quot;Microsoft.SharePointquot; %>
The ASP.NET file's code will, if
the document is available for
<script runat=quot;serverquot;>
checkout, check out the file
void Page_Load()
using the Windows SharePoint
Services object model, and then {
send it down to the user via the SPWeb web = SPControl.GetContextWeb(Context);
ASP.NET Response object. To string strPath = Request.QueryString[quot;FileNamequot;];
ensure that the document is
SPFile file=web.GetFile(strPath);
saved locally rather than simple
being opened, the download will
if ((file.Exists) && (file.CheckOutStatus ==
be marked as a simple octet
stream rather than as a specific Microsoft.SharePoint.SPFile.SPCheckOutStatus.None))
Page 7 of 9
10. Creating a Custom Site Definition for Microsoft Windows SharePoint Services
Tasks Detailed Steps
document format for which an {
application may be registered. Response.Clear();
file.CheckOut();
Response.AddHeader(quot;Content-Dispositionquot;,
quot;attachment; filename=quot; + file.Name);
Response.AddHeader (quot;Content-Lengthquot;,
file.Length.ToString());
Response.ContentType = quot;application/octet-streamquot;;
Response.BinaryWrite(file.OpenBinary());
}
else
{
Response.Write(quot;The file does not existquot; + quot; or is
already checked out.quot;);
}
}
</script>
f. Click File | Save All.
g. Click File | Exit.
Page 8 of 9
11. Creating a Custom Site Definition for Microsoft Windows SharePoint Services
Exercise 4
Create a New Site Based on the Custom Definition
Scenario
In this exercise, you will create a new site with your changes.
Tasks Detailed Steps
1. Create a new site a. Maximize Internet Explorer.
b. In the top navigation bar, click Sites.
c. In the left navigation bar, under Actions, click Create Site.
d. In the Title field, type New FOO Site.
e. In the URL name field, type FOO.
f. Click Create.
g. Click OK.
h. Select the FOO Site template you just created and click OK.
i. Explore the site. Notice the My Site link in the top navigation bar.
2. Test the menu a. Return to the home page of the site you just created.
b. In the left navigation bar, click Shared Documents.
c. In the toolbar, click Upload Document.
d. Click Browse.
e. Navigate to C:Sales Fileshare, select Annual Report.doc and click Open.
f. Click Save and Close.
g. Once the document has been uploaded, let your mouse pointer hover over the
uploaded document on the Shared Documents page. When the command list menu
appears, click on the down arrow to display the list of possible commands.
h. Select the Check Out command.
i. Select the Edit in Microsoft Office Word command. The document will open in
a new instance of Word.
j. Click Ok to open the document.
Page 9 of 9