Sharepoint Designer etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
Sharepoint Designer etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

Çarşamba, Ağustos 31, 2016

SharePoint Autonumber Custom List Field

  1. Open your web site in SPD.
  2. Create a new workflow. In the File menu, select New->Workflow...
  3. In the dialog that appears, give the workflow a name, e.g. "Assign Customer Number". In the drop-down list below, choose to connect the workflow to the list you want to assign autonumbers to (In this case, this would be a list called Customers). Then check the middle option of the three check boxes below, "Start this workflow automatically when a new item is created".
  4. On the same dialog, there is a button at the bottom called "Variables...". Click it. Choose "Add", name it "mNumber" and make it of type "Number". Click OK, and OK again. Now, click "Next" in the dialog.
  5. You can leave the step name as is ("Step 1"). Leave the "Condition" empty, and click the "Actions" button. In the menu that appears, select "Set workflow variable". This will add an action to the list to the right of the Actions button. Now you need to set up this action. Click the link "Workflow variable", this will open a small dropdown list. Select "Variable: mNumber". Then click the next link, "value". This will display a textbox and a small button in place of the link. Click the button ("Show databindings"). This will bring up a new dialog, where you will select the value to assign to the "mNumber" variable. In the "Data Source" drop down, select "Unique Numbers". In the drop down just below ("Field:") select "NextNumber". Now, the dialog will be expanded with a "Find list object" section. In the drop down "Field:", select "Unique Numbers:Title", and in the value box below, typeCUSTOMERNO. Click OK. SPD will now give a warning that the look up might return more than one value, just select "Yes" to continue here.
  6. Now you add one more action. Click the "Actions" button and select "Set field in current object". Click the "field" link in the new action, and in the list that appears, select the field in your list that is the target of the autonumber (e.g. "CustomerNo"). Then click the "value" link, and once again click the little button that appears ("Show databindings"). This time, in the "Data Source" drop down, select "Workflow data", and then in the next drop down, select the variable "mNumber". Click OK.
  7. Add yet another action, this time choose the "Update list item" action. Click the link in the new action, "update list object in this list". This brings up another dialog, in the "List" drop down, select "Unique Numbers". Click the "Add" button just below to the right, and in the new dialog's first drop down ("Set this field:"), select "LastNumber" and to the right of the "To this value:" text box, click the formula button. Again, a new dialog appears, in the "Data Source" dropdown, select "Workflow data" and then in the "Field" drop down, select "Variable: mNumber". Click OK twice to get back to the "Update list item" dialog. Now, once again in the "Find list object" section, select "Unique Numbers:Title", and type in the value CUSTOMERNO. SPD will give a warning again, click "Yes".
  8. That's it. Click the "Finish" button, and if all is well, the workflow will be created.

Now, everytime you add a new item to the "Customers" list, this workflow will run and assign an auto-incrementing number to the "CustomerNo" field.

Hope this helps,
Source

Turhal Temizer

Çarşamba, Aralık 11, 2013

Sharepoint – Lokalizasyon (LCID) Kodları

Merhaba,

 

Geçen günlerde ilgilendiğim bir proje ile ilgili Localizasyon kodlarına gereksinim oldu. Elimin altında olması ve gerekirse sizlere de kolaylık sağlayabilmesi amacıyla alt kısımda bu listeyi paylaşıyorum.

 

Listenin alındığı orjinal adres: http://msdn.microsoft.com/en-us/goglobal/bb964664 şeklindedir.

Language - Country/Region LCID Hex LCID Dec
Afrikaans - South Africa 0436 1078
Albanian - Albania 041c 1052
Alsatian 0484 1156
Amharic - Ethiopia 045e 1118
Arabic - Saudi Arabia 0401 1025
Arabic - Algeria 1401 5121
Arabic - Bahrain 3c01 15361
Arabic - Egypt 0c01 3073
Arabic - Iraq 0801 2049
Arabic - Jordan 2c01 11265
Arabic - Kuwait 3401 13313
Arabic - Lebanon 3001 12289
Arabic - Libya 1001 4097
Arabic - Morocco 1801 6145
Arabic - Oman 2001 8193
Arabic - Qatar 4001 16385
Arabic - Syria 2801 10241
Arabic - Tunisia 1c01 7169
Arabic - U.A.E. 3801 14337
Arabic - Yemen 2401 9217
Armenian - Armenia 042b 1067
Assamese 044d 1101
Azeri (Cyrillic) 082c 2092
Azeri (Latin) 042c 1068
Bashkir 046d 1133
Basque 042d 1069
Belarusian 0423 1059
Bengali (India) 0445 1093
Bengali (Bangladesh) 0845 2117
Bosnian (Bosnia/Herzegovina) 141A 5146
Breton 047e 1150
Bulgarian 0402 1026
Burmese 0455 1109
Catalan 0403 1027
Cherokee - United States 045c 1116
Chinese - People's Republic of China 0804 2052
Chinese - Singapore 1004 4100
Chinese - Taiwan 0404 1028
Chinese - Hong Kong SAR 0c04 3076
Chinese - Macao SAR 1404 5124
Corsican 0483 1155
Croatian 041a 1050
Croatian (Bosnia/Herzegovina) 101a 4122
Czech 0405 1029
Danish 0406 1030
Dari 048c 1164
Divehi 0465 1125
Dutch - Netherlands 0413 1043
Dutch - Belgium 0813 2067
Edo 0466 1126
English - United States 0409 1033
English - United Kingdom 0809 2057
English - Australia 0c09 3081
English - Belize 2809 10249
English - Canada 1009 4105
English - Caribbean 2409 9225
English - Hong Kong SAR 3c09 15369
English - India 4009 16393
English - Indonesia 3809 14345
English - Ireland 1809 6153
English - Jamaica 2009 8201
English - Malaysia 4409 17417
English - New Zealand 1409 5129
English - Philippines 3409 13321
English - Singapore 4809 18441
English - South Africa 1c09 7177
English - Trinidad 2c09 11273
English - Zimbabwe 3009 12297
Estonian 0425 1061
Faroese 0438 1080
Farsi 0429 1065
Filipino 0464 1124
Finnish 040b 1035
French - France 040c 1036
French - Belgium 080c 2060
French - Cameroon 2c0c 11276
French - Canada 0c0c 3084
French - Democratic Rep. of Congo 240c 9228
French - Cote d'Ivoire 300c 12300
French - Haiti 3c0c 15372
French - Luxembourg 140c 5132
French - Mali 340c 13324
French - Monaco 180c 6156
French - Morocco 380c 14348
French - North Africa e40c 58380
French - Reunion 200c 8204
French - Senegal 280c 10252
French - Switzerland 100c 4108
French - West Indies 1c0c 7180
Frisian - Netherlands 0462 1122
Fulfulde - Nigeria 0467 1127
Galician 0456 1110
Georgian 0437 1079
German - Germany 0407 1031
German - Austria 0c07 3079
German - Liechtenstein 1407 5127
German - Luxembourg 1007 4103
German - Switzerland 0807 2055
Greek 0408 1032
Greenlandic 046f 1135
Guarani - Paraguay 0474 1140
Gujarati 0447 1095
Hausa - Nigeria 0468 1128
Hawaiian - United States 0475 1141
Hebrew 040d 1037
Hindi 0439 1081
Hungarian 040e 1038
Ibibio - Nigeria 0469 1129
Icelandic 040f 1039
Igbo - Nigeria 0470 1136
Indonesian 0421 1057
Inuktitut 045d 1117
Irish 083c 2108
Italian - Italy 0410 1040
Italian - Switzerland 0810 2064
Japanese 0411 1041
K'iche 0486 1158
Kannada 044b 1099
Kanuri - Nigeria 0471 1137
Kashmiri 0860 2144
Kashmiri (Arabic) 0460 1120
Kazakh 043f 1087
Khmer 0453 1107
Kinyarwanda 0487 1159
Konkani 0457 1111
Korean 0412 1042
Kyrgyz (Cyrillic) 0440 1088
Lao 0454 1108
Latin 0476 1142
Latvian 0426 1062
Lithuanian 0427 1063
Luxembourgish 046e 1134
Macedonian 042f 1071
Malay - Malaysia 043e 1086
Malay - Brunei Darussalam 083e 2110
Malayalam 044c 1100
Maltese 043a 1082
Manipuri 0458 1112
Maori - New Zealand 0481 1153
Mapudungun 0471 1146
Marathi 044e 1102
Mohawk 047c 1148
Mongolian (Cyrillic) 0450 1104
Mongolian (Mongolian) 0850 2128
Nepali 0461 1121
Nepali - India 0861 2145
Norwegian (Bokmål) 0414 1044
Norwegian (Nynorsk) 0814 2068
Occitan 0482 1154
Oriya 0448 1096
Oromo 0472 1138
Papiamentu 0479 1145
Pashto 0463 1123
Polish 0415 1045
Portuguese - Brazil 0416 1046
Portuguese - Portugal 0816 2070
Punjabi 0446 1094
Punjabi (Pakistan) 0846 2118
Quecha - Bolivia 046B 1131
Quecha - Ecuador 086B 2155
Quecha - Peru 0C6B 3179
Rhaeto-Romanic 0417 1047
Romanian 0418 1048
Romanian - Moldava 0818 2072
Russian 0419 1049
Russian - Moldava 0819 2073
Sami (Lappish) 043b 1083
Sanskrit 044f 1103
Scottish Gaelic 043c 1084
Sepedi 046c 1132
Serbian (Cyrillic) 0c1a 3098
Serbian (Latin) 081a 2074
Sindhi - India 0459 1113
Sindhi - Pakistan 0859 2137
Sinhalese - Sri Lanka 045b 1115
Slovak 041b 1051
Slovenian 0424 1060
Somali 0477 1143
Sorbian 042e 1070
Spanish - Spain (Modern Sort) 0c0a 3082
Spanish - Spain (Traditional Sort) 040a 1034
Spanish - Argentina 2c0a 11274
Spanish - Bolivia 400a 16394
Spanish - Chile 340a 13322
Spanish - Colombia 240a 9226
Spanish - Costa Rica 140a 5130
Spanish - Dominican Republic 1c0a 7178
Spanish - Ecuador 300a 12298
Spanish - El Salvador 440a 17418
Spanish - Guatemala 100a 4106
Spanish - Honduras 480a 18442
Spanish - Latin America 580a 22538
Spanish - Mexico 080a 2058
Spanish - Nicaragua 4c0a 19466
Spanish - Panama 180a 6154
Spanish - Paraguay 3c0a 15370
Spanish - Peru 280a 10250
Spanish - Puerto Rico 500a 20490
Spanish - United States 540a 21514
Spanish - Uruguay 380a 14346
Spanish - Venezuela 200a 8202
Sutu 0430 1072
Swahili 0441 1089
Swedish 041d 1053
Swedish - Finland 081d 2077
Syriac 045a 1114
Tajik 0428 1064
Tamazight (Arabic) 045f 1119
Tamazight (Latin) 085f 2143
Tamil 0449 1097
Tatar 0444 1092
Telugu 044a 1098
Thai 041e 1054
Tibetan - Bhutan 0851 2129
Tibetan - People's Republic of China 0451 1105
Tigrigna - Eritrea 0873 2163
Tigrigna - Ethiopia 0473 1139
Tsonga 0431 1073
Tswana 0432 1074
Turkish 041f 1055
Turkmen 0442 1090
Uighur - China 0480 1152
Ukrainian 0422 1058
Urdu 0420 1056
Urdu - India 0820 2080
Uzbek (Cyrillic) 0843 2115
Uzbek (Latin) 0443 1091
Venda 0433 1075
Vietnamese 042a 1066
Welsh 0452 1106
Wolof 0488 1160
Xhosa 0434 1076
Yakut 0485 1157
Yi 0478 1144
Yiddish 043d 1085
Yoruba 046a 1130
Zulu 0435 1077
HID (Human Interface Device) 04ff 1279

Kolay gelsin.

--

TT

Perşembe, Kasım 04, 2010

SharePoint 2010 Error: Cannot make a cache safe URL for "1031/styles/Themable/corev4.css", file not found. Please verify that the file exists under the layouts directory.

I had to take backup from my client’s production site to make some analysis in my local server. So I took backup and restored the site in local server. Restored was successful. Then I changed the site collection administrator of the restored site as it was still pointing to the production server’s site collection administrator.

Then I tried to browse the site and found the interesting error “Cannot make a cache safe URL for "1031/styles/Themable/corev4.css", file not found. Please verify that the file exists under the layouts directory.” The very first thing I noticed the path contains 1031. Anyone can guess that this is language id and thought came to my mind is that my client SharePoint site not in English. The production site was in German language and when I restored the site, its looking for resources in German language ID folder.

Then I download the language pack from MSND and refreshed the browser. It worked like magic….

Perşembe, Ekim 28, 2010

SharePoint 2010 - Modal Pop-Up for a Unique Content Type

To continue the conversation with the modal pop up window, I was asked the following great question:

What if your list has different content types, each having their own form? Is there a way to make this pop-up specific to the form of a certain content type?”

The answer is yes it is quite easy to link the pop-up modal window to a unique content type: You would use the same approach but you would add in the Content Type ID to the end of the URL string:

<a onclick="javascript:NewItem2(event, &quot;http://sitename/_layouts/listform.aspx?PageType=8&amp;ListId={49E3BDCF-9C06-413D-A7B8-413F2E8F6B0D}&amp;ContentTypeId=0x01005C9243AA25668B4CAACB42C41B0D360600052ECA5C

1544864D9F9B7BF90A874A4F&amp;RootFolder=&quot;);
javascript:return false;"
href="/_layouts/listform.aspx?PageType=8&amp;ListId={49E3BDCF-9C06-413D-A7B8-413F2E8F6B0D}&amp;ContentTypeId=0x01005C9243AA25668B4CAACB42C41B0D360600052ECA5C

1544864D9F9B7BF90A874A4F&amp;RootFolder="
target="_self">
Add a Unique Content Type Item</a>

To find the custom content type ID, simply click on the list settings, within the content type section right click on the custom content type and then click on properties. Within the Address URL, the ID is at the very end after the “ctype=”

Simply Replace the above blue ID with your own custom one. This will allow you to have links to custom content types within the same list and not have to worry about the default content type settings.

Çarşamba, Ekim 27, 2010

SharePoint 2010 - Ways to extend the SharePoint Modal Window

So in my last post I simply wanted to show an input form in a SharePoint 2010 modal window. This got my creative juices flowing and I wanted to experiment a little. I found out that you can easily display anything in the Modal window that you wanted.

Web Site: Bing
<a onclick="javascript:NewItem2(event, &quot;http://www.bing.com&quot;);
javascript:return false;" href="http://www.bing.com/" target="_self">Show Bing In Modal Window</a>

image

Image
<a onclick="javascript:NewItem2(event, &quot;http://sitename/Images/image.png&quot;);
javascript:return false;" href="/images/image.png/" target="_self">Show Image</a>

image

Video/Games
This does not really work since most video’s open up in a separate application like Window Media Player and not within the browser. However you can use things like flash .swf files to show in the modal window.
<a onclick="javascript:NewItem2(event, &quot;http://www.microsoft.com/games/gamesforwindows/games/madagascar2/Mad2_Final_ENU.swf&quot;);
javascript:return false;" href="http://www.microsoft.com/games/gamesforwindows/games/madagascar2/Mad2_Final_ENU.swf" target="_self">Flash Game</a>

image

So basically you can show basically anything that you have a link to and can be visible within a browser.

Enjoy, and let me know what creative things you have placed in your modal window…

Salı, Ekim 26, 2010

SharePoint 2010 - How To: Create Hyperlink to Modal Pop-Up Form

I was asked by a client recently if there was a way to create a hyperlink to a New Item Form anywhere within a site but still get the rich experience of the Modal pop-up window that grays out the background. (Note this is for SharePoint 2010 Only…)

I basically took the code directly from the “Add new item” and the “Add Document” link within the list view.

What this allows you to do is simply add in the following code to any content editor web part, Master page, or Page Layout in any site collection and display the form to be filled out. The user will get the nice experience of the modal window and not have to navigate away from their current page.

image

This could be used for example a feedback form that is included in the master page so whenever someone wants to give feedback it is always going back to a central list. The only that is required for you to know is the List ID and the site name.

Full Code For a List Item:
<a onclick="javascript:NewItem2(event, &quot;http://SiteName/_layouts/listform.aspx?PageType=8&amp;ListId={83747BB4-49C6-4181-B4A3-F8C6B611846D}&amp;RootFolder=&quot;);
javascript:return false;"
href="/_layouts/listform.aspx?PageType=8&amp;ListId={83747BB4-49C6-4181-B4A3-F8C6B611846D}&amp;RootFolder="
target="_self">
Submit Feedback</a>

Full Code for a Library Item:
<a href="http://SiteName/_layouts/Upload.aspx?List={94AC86A8-6774-4822-A197-A98542251678}&amp;
RootFolder=" onclick="javascript:NewItem2(event, &quot;http://SiteName/_layouts/Upload.aspx?List={94AC86A8-6774-4822-A197-A98542251678}&amp;RootFolder=&quot;);
javascript:return false;"
target="_self">
Upload a Document</a>

What you need to change:
URL: Change “SiteName” to your URL
List ID: Change the list ID to your custom list/library ID

  • To find out the list/library ID, simply navigate to the list/library you want to display and then click on list settings
  • Look at the end of the URL.
  • You will get something similar to this: %7B94AC86A8%2D6774%2D4822%2DA197%2DA98542251678%7D
  • Remove the first %7B and the last %7D
  • Then change all %2D’s to “-“
  • So the final would be 94AC86A8-6774-4822-A197-A98542251678

You could also add in an image right within the <a> tag and make a nice button for users to click on. Once you have customized the code you can now simply add the code to any page on the site and you will get the following results:

Site Collection 2 hyper linking to a list on Site Collection 1

image

Pazartesi, Ekim 25, 2010

SharePoint 2010 - How To: Hide Left Side Navigation on Home Page

I was recently asked: "How can I hide the side nav bar on the main homepage layout ?? I want to be able to use the side NAV with in the team site etc etc, but I don't want it on the front page.. "

There are a couple of ways to do this in SharePoint 2010. If you are using a non-publishing site you can add a Content Editor Web Part to the page and add the following to the HTML Source.

image
<Style>
body #s4-leftpanel
{
display: none;
}
.s4-ca
{
margin-left: 0px;
}
</style>

Basically the CSS above hides the left navigation Div, and then sets the content area to not have a left margin.

Once you are done, simply modify the web part and hide it on the page.

image

If you are using a publishing site for your homepage simply add the same styles specified above to a custom page layout. That way if you have a need for other pages that do not need the left side navigation you can re-use the page layout.

Pazar, Ekim 24, 2010

SharePoint 2010 - Enable Small Social Buttons

To convert the large social buttons to smaller ones you simply have to modify the following:

Within your custom Master Page search for: “GlobalSiteLink3

Simply Add “-mini” to the control ID

Original Large Control:
<SharePoint:DelegateControl ControlId="GlobalSiteLink3" Scope="Farm" runat="server"/>
image

New Small Control ID:
<SharePoint:DelegateControl ControlId="GlobalSiteLink3-mini" Scope="Farm" runat="server"/>
imageIf you want to make the small buttons horizontal versus vertical simply add the following to your custom CSS:

.ms-mini-socialNotif-Container{
    white-space: nowrap;
}

image
Enjoy!

Cumartesi, Ekim 23, 2010

SharePoint 2010 - Issues with moving search into top ribbon bar

I was recently on a project where there was a requirement to have many items in the main navigation. There was not an option to consolidate these into smaller groups. The idea was to move the search box up into the top ribbon bar.

image

This would allow for more horizontal space for the navigation items. However in my attempt to move the search I found a little gotcha. I selected the search control in SharePoint Designer and moved it right above the welcome navigation control code.

image

Wrapped the control in a div tag and temporarily added an inline style of float left.

<div style="float: left;">
   <asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
      <SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" Version="4"/>
   </asp:ContentPlaceHolder>
</div>

image

I saved the master page and then checked out what it looked like. The search was moved up correctly but it was not until I used IE8 dev toolbar to check for compatibility in IE7.

image

As you can see below in IE7 the search, and welcome link/drop down is no where to be seen and the ribbon tabs got all squished.

image

After doing some testing in IE7 mode an inline style gets applied to the ms-cui-TabRowRight with “Display: none”

image

I am not 100% why this is, but if I try to put the search anywhere else in the ribbon it just does not show… So I guess this is more of a warning to the designers out there. If you are thinking about putting the search in the top ribbon bar in your design comps know that there might be some issues with browser compatibility.

So what I ended up doing is moving the search to the left of the Social Notification tags. Wrapped it in a <td> tag and called it a day. The client was happy with the results since they were still able to have their navigation items and the search moved to a different location.

image

image

Thanks Fur Sadik Ulker!!!

Cuma, Ekim 22, 2010

SharePoint 2010 - Tab Web Part JQuery, Java, and CSS

I have been searching for a simple tab web part for SharePoint but mostly came up empty handed… I was looking for something that a user can easily drag and drop a web part onto a specific tab within the page. There are quite a few free tab web parts out there but most of them were not just quite what I wanted. I checked out the following Tab web part solutions.

  1. Easy Tabs: From Path To SharePoint
    • Pro: The tabs automatically take the name of the web part.
    • Con: There is no option to add more than one web part per tab, and the User Interface is not that intuitive.
  2. Zone Tabs: From MSDN
    • Pro: You have a lot of options for tab customization
    • Con: It’s a web part that you have to install on the server. From what I remember it’s not that easy to re-arrange the web parts on the page.

I finally found this article from Bits Of SharePoint Site:
http://www.bitsofsharepoint.com/ExamplePoint/Site/TabPage.aspx

His code was exactly what I needed. All I had to do was make a few adjustments of the HTML and create my own tab styles. The process to get this to work is you simply edit the page layout in the source link below (Code is already included in header control) and change the name of the tabs to what ever you want. You can have as many tabs as you want but if you go over 8 you will need to add more web part zones.

<li><a href="#tab-1" class="selected"><span>Tab1</span></a></li>
<li><a href="#tab-2" ><span>Tab2</span></a></li>
<li><a href="#tab-3" ><span>Tab3</span></a></li>

Once you have your tabs specified, simply choose what design you want. I created a few example designs that will get you started. To change the designs simply remove the commented out referenced style sheet and comment out the one you don’t want. You can place the support files anywhere you want but the links in the page layout point to the 12 hive: /_layouts/1033/styles/tabstyles/

For inspiration, I looked around the web and found a few unique styles that I wanted to replicate, and I also came up with a few of my own.

Design 1: MSN
msntab

Design 2: Yahoo
yahootab

Design 3: WebMD
webmdtab

Design 3a: WebMD Alt
webmdalttab

Design 4: Rounded Tabs 1
roundtab

Design 5: Rounded Tabs 2
round2tab

Drop me a comment if you found this useful!

Perşembe, Ekim 21, 2010

SharePoint 2010 - Content Query for Blog Posts

I hope this post will help many of you feel comfortable with using the Content Query Web Part.

In this post I will walk you through the process of creating a content query web part and configuring it to show custom field types. I will also give details on how to use XSLT to stylize and format the data being pulled.

I will be using the following scenario as an example. Say that you had a site collection with a top level publishing site. This publishing site would display a the most recent blog posts from all blog sites within its own site collection.

To solve this problem we will use a Content Query Web Part and a customized ItemStyle.xsl using XSLT.

Please note that the “SharePoint Server Publishing Infrastructure” needs to be enabled at the site collection to display the content query web part.

Step 1: Add a Content Query Web Part to Page

  • Navigate to the site that you want the blog posts to show up and click on edit page.
  • Under Editing Tools in the Ribbon, Click on insert > Web Part
  • Under the Content Rollup Category Click on Content Query
  • Then Click on the Add Button
  • Now that you have a CQWP on the page edit the web part

image

  • Expand open the “Query” properties
  • Since we will be just showing blog post in this query choose the following
    • List Type: Posts
    • Content Type Group: List Content Types
    • Content Type: Post
  • You should get a result like the following.

image

  • Next we will configure the web part to pull in additional values from the blog posts.
    • Title – linked to post
    • Date – with standard formatting
    • Body – Rich text
    • Author
    • Number of Comments
    • Categories

Step 2: Configure Web Part

  • Click on web part arrow and choose “Export”
  • Save the .webpart file to your desktop
  • Edit the “Content_Query.webpart” file in Notepad
  • Search for "CommonViewFields”
  • Replace the default “<property name="CommonViewFields" type="string" />” with the following:

<property name="CommonViewFields" type="string">Title, Text;PublishedDate, DateTime;Body, RichHTML;Author, Text;NumComments, Lookup;PostCategory, Lookup;</property>

  • Here are the available Field Types that can be used
    • Text
    • Note
    • Number
    • Currency
    • Integer
    • Boolean
    • DateTime
    • Threading
    • Lookup
    • Choice
    • URL
    • Counter
    • RichHTML
    • Image
  • When creating your own there are a few rules.
    • First off you need to separate each custom field type by a semi colon (Ex: Title, Text;Editor, Text)
    • There cannot be a space after the semi colon
  • Save the .webpart file
  • Edit the page again and choose Inster Web Part
  • It’s a little hard to find but click on the Upload a Web Part and browse for the custom .webpart file.

image

  • Click on Upload
  • Now when you click on Insert webpart you will see a category of imported webparts.
  • Click on Add button.
  • Now you will not see a difference but now the webpart has been configured to display these custom columns.

Step 3: Configure ItemStyle.xsl

  • Click on View All Site Content > Style Library > XSL Style Sheets
  • Download the itemstyle.xsl file
  • Add the following to the top of the file

xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"

  • At the very bottom of the xsl file add the following template

  <xsl:template name="BlogPost" match="Row[@Style='BlogPost']" mode="itemstyle">
        <xsl:variable name="SafeLinkUrl">
            <xsl:call-template name="OuterTemplate.GetSafeLink">
                <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
            </xsl:call-template>
        </xsl:variable>
        <xsl:variable name="DisplayTitle">
            <xsl:call-template name="OuterTemplate.GetTitle">
                <xsl:with-param name="Title" select="@Title"/>
                <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
            </xsl:call-template>
        </xsl:variable>
        <div class="custom_posttitle">
            <xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
            <a href="{$SafeLinkUrl}" title="{@LinkToolTip}">
              <xsl:if test="$ItemsHaveStreams = 'True'">
                <xsl:attribute name="onclick">
                  <xsl:value-of select="@OnClickForWebRendering"/>
                </xsl:attribute>
              </xsl:if>
              <xsl:if test="$ItemsHaveStreams != 'True' and @OpenInNewWindow = 'True'">
                <xsl:attribute name="onclick">
                  <xsl:value-of disable-output-escaping="yes" select="$OnClickTargetAttribute"/>
                </xsl:attribute>
              </xsl:if>
              <xsl:value-of select="$DisplayTitle"/>
            </a>
        </div>
    <xsl:variable name="StartDate">
        <xsl:value-of select="ddwrt:FormatDateTime(string(@PublishedDate), 1033, 'g')" />
    </xsl:variable>
    <div class="custom_date">
            <xsl:value-of select="$StartDate" />
    </div>
    <div class="custom_description">
            <xsl:value-of select="@Body" disable-output-escaping="yes" />
    </div>
    <div>
        <table class="custom_postdetails" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td class="custom_author">
                        By: <xsl:value-of select="@Author" /> |
                </td>
                <td class="custom_comments">
                        Comments: <xsl:value-of select="@NumComments" /> |
                </td>
                <td class="custom_category">
                        Category: <xsl:value-of select="@PostCategory" />
                </td>
            </tr>
        </table>
    </div>
  </xsl:template>

  • Save the file and upload it to back up to the style library

Step 4: Apply Custom XSL style to content query

  • Modify the Content Query Web Part again
  • Expand open The Presentation Category
  • Choose the custom “BlogPost” style
  • Save the page and you should now see the blog post with the following data and format.

image

Çarşamba, Ekim 20, 2010

SharePoint 2010 - SharePoint Designer 2010 Edit in Advanced Mode

In SharePoint Designer 2007 you can simply open up any type of file you wanted even if it did not reside in SharePoint. Well now things have change for 2010… Now you are forced to open up a SharePoint site before attempting to open up a file that resides outside of SharePoint. If you try before opening up a site you get the following error message: “You must first open a Web site before editing external Web pages…” Not really sure why they changed this maybe they want to ensure that you are not downloading the free SharePoint designer and simply using it as a HTML editor for non-SharePoint sites…

image

Anyways that is not the focus of this post. I also noticed that SharePoint designer tricks you to thinking that you cannot edit pages. Say you want to modify a file that does reside in SharePoint. By Default it will open up in a read only view (HTML) and will not allow you to change the file. It will have a orange like highlight to areas that are not editable.

image

So the trick is to right click on the document and choose the option “Edit File in Advanced Mode”.

image

Now you can edit the file as you wish!

image

Hope this helps! If you know of a better way please leave a comment.

Salı, Ekim 19, 2010

SharePoint 2010 - Themes

As you all know SharePoint has a new theme engine for 2010. You can do cool things such as create a theme in PowerPoint, export it and then import it into SharePoint 2010, click apply and you got a custom theme. One aspect that I could not find documented is the definition of when you choose a color for a particular element what is it really changing?

If you modify the theme for a site you can use the picker to choose a OOTB or custom theme. Or you have the ability to choose your own color scheme via the following elements.

image

My approach: Make each element white to start with and then one by one add color and document the results. Just for kicks here is what it looks like when it is completely white… (not a color scheme I would recommend…) I will be using a red color: #C12345 for testing.

image

Here are the details for each one of the elements above:

Text/Background- Dark 1 (41 Classes)

image

  • Page Title Hyperlink Text
  • Hover Text
  • VB Body Text
  • Site Action Menu Text
  • Left Navigation Links Text
  • Site Setting Page Text Headers

Text/Background - Light 1  (37 Classes)

image

  • Body Background
  • Toolbar Background
  • Quick Launch Borders
  • Web Part Header Background
  • Site Action Menu Background
  • Site Action/Welcome Text Color
  • Pop-Up Window Background

Text/Background - Dark 2  (43 Classes)

image

  • Top Banner Background
  • Left Navigation Header Text
  • Recycle Bin/View All Site Content Text
  • I Like/Tags Notes Text
  • Library Column Text
  • Site Action Drop Down Border
  • Breadcrumb Current Location Text
  • List Description Text

Text/Background - Light 2  (19 Classes)

image

image

  • Browse Tab and hover Background
  • Title Container Background
  • Top Links/Header 2 Background
  • Quick Launch Background
  • Web Part Adder Background

Accent 1  (10 Classes)

image

  • Quick Launch Hover Text
  • Top Link Selected Tab

Accent 2  (4 Classes)

image

  • .ms-error
  • Rich Text Colored Heading 2 Text Styles

Accent 3  (9 Classes)

image

  • Rich Text “Caption” Style Text Color

Accent 4  (5 Classes)

image

  • Border Under Web Part Selector

Accent 5  (3 Classes)

image

  • Rich Text Colored Heading 4 Text Styles

Accent 6  (3 Classes)

image

  • Rich Text Highlight background color

Hyperlink  (12 Classes)

image

  • Toolbar Text Color
  • VB Body Hyperlink Text
  • a:link Class Text Color
  • Web Part Title Hyperlink Text (Not Visited)

Followed Hyperlink (2 Classes)

  • .ms-WPBody a:visited
  • a:visited

I hope this post will help you when you decide to create your own theme via the above elements. If you create your own theme you can simply view the source of the page and there will be a unique CSS style sheet reference “_themes/16/corev4-8digithex.css?ctag=#”. Just copy that url and past it to the end of your site string http://yoursitename.com/ and you can download the custom file.

Pazartesi, Ekim 18, 2010

SharePoint - Style Individual Navigation Items for 2007 & 2010

Here is a simple yet effective way to stylize individual top navigation items for SharePoint 2007 & 2010 just using CSS. SharePoint 2010 will need a slight modification to the master page but the same effect can be achieved. See bottom of post for 2010 implementation.

To start off with lets review how this can be accomplished for 2007. SharePoint 2007 provides a unique ID for each note in the navigation.

  1. 1st Tab: Dedicated as your default Home or root node
    • ID: zz1_TopNavigationMenun0
  2. 2nd Tab: This is the first child node from the root
    • ID: zz1_TopNavigationMenun1
  3. 3rd Tab: This is the second child node from the root
    • ID: zz1_TopNavigationMenun2
  4. 4th Tab: This is the third child node from the root
    • ID: zz1_TopNavigationMenun3 

See the pattern… It keeps going and going. Here is what it looks like from the IE DOM Explorer in IE8:

image

So you might ask well what can I do with this unique ID? Well here is a quick sample of what you can do. Its not pretty but it shows off that you can have a custom Icon, background color, font, etc. for each node in the navigation.

image

Here is the CSS and OOTB Icon references that I used to create the above design. So how does it work? Basically it combines the trigger of the unique ID and attaches it to the class of “ms-topnav a”. You will notice that I had to do a funky bit of css to fill in the background behind the arrow for news.

.ms-topnav{
border: none;
background-color: transparent;
background-image: none;
font-weight: bold;
}
#zz1_TopNavigationMenun0 .ms-topnav a{
background-image: url(/_layouts/images/newshomepage.png);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #006699;
border: 1px #006699 solid !important;
padding:18px 20px 0px 80px;
height: 54px;
color: #FFF;
}
#zz1_TopNavigationMenun1 .ms-topnav a{
background-image: url(/_layouts/images/PLICON.PNG);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #FF9933;
border: 1px #FF9933 solid !important;
padding:18px 20px 0px 80px;
height: 54px;
color: #FFF;
}
#zz1_TopNavigationMenun2 .ms-topnav a{
background-image: url(/_layouts/images/ANNOUNCE.PNG);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #336633;
border: 1px #336633 solid !important;
padding:18px 20px 0px 80px;
height: 54px;
color: #FFF;
}
#zz1_TopNavigationMenun2 .ms-topnav td{
background-color: #336633;
}
#zz1_TopNavigationMenun3 .ms-topnav a{
background-image: url(/_layouts/images/ReportCenter.png);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #990000;
border: 1px #990000 solid !important;
padding:18px 20px 0px 80px;
height: 54px;
color: #FFF;
}
#zz1_TopNavigationMenun4 .ms-topnav a{
background-image: url(/_layouts/images/SMT_LARGE.PNG);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #660066;
border: 1px #660066 solid !important;
padding:18px 20px 0px 80px;
height: 54px;
color: #FFF;
}
#zz1_TopNavigationMenun5 .ms-topnav a{
background-image: url(/_layouts/images/categories.png);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #999;
border: 1px #999 solid !important;
padding:18px 20px 0px 80px;
height: 54px;
color: #FFF;
}

So how do you do this for SharePoint 2010…

Well first you will need to modify the master page and do a search for “UseSimpleRendering="true"”. This basically tells SharePoint to render the navigation using a clean unordered list <UL> <LI> format.

Since this is so clean, it does not have any unique ID’s attached to it like it did in SharePoint 2007.

image

So if you change it to false: UseSimpleRendering="false" you can clearly see that each node now has a unique ID:

image

So if we simply take the same approach for 2007 we can get similar results.  You will notice the only difference in the ID’s from 2007 to 2010 is that they put in a “V4” after the word “Menu” and before the “n#”

  1. 2007 ID: zz1_TopNavigationMenun0
  2. 2010 ID: zz1_TopNavigationMenuV4n0

You can also remove the “ms-topnav” since it is not needed. You should end up with something like this:

image

Below is the CSS that I used to achieve the design above for SharePoint 2010. Remember you need to make that modification to the master page noted above to get this to work. Also notice that I kept the “a” reference at the end of each ID.

#s4-topheader2{
border: none;
background-color: transparent;
background-image: none;
font-weight: bold;
height: 54px;
padding-bottom: 5px;
}
#zz1_TopNavigationMenuV4n0 a{
background-image: url(/_layouts/images/newshomepage.png);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #006699;
border: 1px #006699 solid !important;
padding:18px 20px 18px 80px;
color: #FFF;
}
#zz1_TopNavigationMenuV4n1 a{
background-image: url(/_layouts/images/PLICON.PNG);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #FF9933;
border: 1px #FF9933 solid !important;
padding:18px 20px 18px 80px;
color: #FFF;
}
#zz1_TopNavigationMenuV4n2 a{
background-image: url(/_layouts/images/ANNOUNCE.PNG);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #336633;
border: 1px #336633 solid !important;
padding:18px 20px 18px 80px;
color: #FFF;
}
#zz1_TopNavigationMenuV4n3 a{
background-image: url(/_layouts/images/ReportCenter.png);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #990000;
border: 1px #990000 solid !important;
padding:18px 20px 18px 80px;
color: #FFF;
}
#zz1_TopNavigationMenuV4n4 a{
background-image: url(/_layouts/images/SMT_LARGE.PNG);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #660066;
border: 1px #660066 solid !important;
padding:18px 20px 18px 80px;
color: #FFF;
}
#zz1_TopNavigationMenuV4n5 a{
background-image: url(/_layouts/images/categories.png);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #999;
border: 1px #999 solid !important;
padding:18px 20px 18px 80px;
color: #FFF;
}

Enjoy!