Click on this icon to open the XML page.Tom Van Gaever - Blog
Search:   

FeatureLinks in custom SharePoint pages 
Wednesday, February 11, 2009, 22:57 - SharePoint
Posted by Administrator
You can implement customactions in your own custom SharePoint page. This enables you to create your peage and afterwards,change or edit the links from within a feature.

Example:


A) In MyCustomPage.aspx


<SharePoint:FeatureLinks runat="server"
ID="GeneralLinks"
Location="MyApplication.Settings"
GroupId="MySettings"
/>



B) define in a feature this custom action:


<CustomAction
GroupId="MySettings"
Location="MyApplication.Settings"
Sequence="1"
Title="My Item Settings"
Rights="ManageWeb">
<UrlAction Url="_layouts/MyCustomPage2.aspx?List={LISTID}
&MyitemID={MYITEMID}" />
</CustomAction>



C: Parsing {STRING}


As you can see there are 2 substrings that need to be parsed with the context. This is the place where OnAddLink enters the scene.


This is wat reflector told me:
public event EventHandler<AddLinkEventArgs> AddLink;


In other terms when we change our FeatureLink like this:
<SharePoint:FeatureLinks runat="server"
ID="GeneralLinks"
Location="MyApplication.Settings"
GroupId="MySettings"
OnAddLink="OnAddMySettingsLink" />
/>



and in the code behind we create our eventhandler:


protected void OnAddGeneralLink(Object sender, AddLinkEventArgs e)
{
e.Link.NavigateUrl =
e.Link.NavigateUrl.Replace("{MYITEMID}", m_id);
e.Link.NavigateUrl =
e.Link.NavigateUrl.Replace("{LISTID}", m_listID);
}

e.link returns a hyperlink webcontrol object that you can manipulate as you like.


add comment   |  permalink   |  related link   |   ( 3 / 103 )
Add URL item to SharePoint Links list 
Saturday, January 24, 2009, 13:41 - SharePoint
Posted by Administrator
If you create a link list (default lists type: 103), the way to add a new SPListItem by code is quite tricky.

If you want to add an new url to this links list with these meta data:

url: "http://tom.vangaever.be/blog"
Description: tom's blog

you'll notice that there is no description property.

the example below shows you how to add a new item:
SPList linkslist = web["links"];
SPListitem newlink = linkslist.Add();
newlink["URL"] = "http://tom.vangaever.be/blog, tom's blog";
newlink.update();


NOTE: there must be a space after the comma, otherwise it won't work.

when you open the links list, you'll notice that the URL displayed is "tom's blog" and when you click on it... http://tom.vangaever.be/blog opens.

good luck :)
1 comment ( 13 views )   |  permalink   |   ( 3 / 157 )
Office 2003, Office 2007 and MOSS 2007 
Monday, January 5, 2009, 10:35 - SharePoint
Posted by Administrator
If you ever wanted to know why is office 2007 so much better than 2003 with SharePoint 2007?

this document will explain it all:

Microsoft Windows SharePoint Services 3.0 and Office SharePoint Server 2007 provide advanced collaboration and enterprise content management capabilities for end users through rich, contextual integration with Office Professional Plus 2007 and Office Enterprise 2007. These latest versions of their respective platforms were developed together for maximum integration, with the expressed purpose of enabling the most powerful user experience possible. While the 2007 Office Suites and Windows SharePoint Services 3.0 and Office SharePoint Server 2007 provide much new and improved functionality compared to their previous versions, the combined deployment of the latest client programs and server technologies is necessary to achieve the best Office and SharePoint integration features.
By leveraging the best Office and SharePoint integration features, you will be able to collaborate more productively, manage your enterprise’s information content and people driven processes more effectively, and improve your business insight more rapidly.


Download:
Microsoft® Office Programs and SharePoint® Products and Technologies Integration


add comment   |  permalink   |   ( 2.9 / 132 )
JQuery and SharePoint - RIA 
Tuesday, November 25, 2008, 16:37 - SharePoint
Posted by Administrator
Today my new webpart is almost finished...

I'm proud to present a RIA webpart that enables SharePoint admins to provide a more graphical menu for the sharepoint navigation. It is implemented within a feature that enables you to add the webpart to your page from the webpart list.





When the webpart is added to your page the left navigation is instantly mirrored on the bottom of your page. Currently the webpart does not remove the left navigation.


I need to check before I can publish the webpart. Any comments are welcome.







add comment ( 9 views )   |  permalink   |   ( 3 / 154 )
Use Javascript to connect SharePoint Webservice in Content editor webpart 
Monday, November 24, 2008, 17:23 - SharePoint
Posted by Administrator

Darren Johnstone created an interesting JavaScript API for SharePoint.

The following examples illustrate the use of the JavaScript API for SharePoint and Office Live. These examples are intended to demonstrate the core uses of the API for solution developers.
* Get the full definition of a list
* Get the full definition of a list and associated view
* Get the basic detail of all lists in a site
* Get the GUID of a list from it’s name
* Querying a list using the Lists web service
* Querying a list using the List Data Retrieval Service
* Create a new list from an existing list template
* Delete a list
* Create one or more new list items
* Update one or more list items
* Delete one or more list items
* Create a new folder within a list
* Performing a keyword search
* Performing a full text search


The API contains 23 JavaScript files.

Let me show you how easy we can create a call to Lists.asmx web service and retrieve all the items:

var lists = new SPAPI_Lists('http://mossserver')
var items = lists.getListItems('Tasks');
if (items.status == 200)
{
var rows = items.responseXML.getElementsByTagName('z:row');
//START DOING JS MAGIC
}

If you're developing custom web parts and you're favorite web part is the content editor web part. Go check out this library.

More information can be found at the related link section of this post.

add comment ( 7 views )   |  permalink   |  related link   |   ( 2.8 / 122 )

<<First <Back | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Next> Last>>