Posts
149
Comments
1871
Trackbacks
14
August 2008 Entries
Adding hyperlink and folders to links list in onet.xml using CAML

Often you may want to create predefined html links in your SharePoint site along with your custom site definition. An example of this is the initial announcement you always get when you create a new team site: "Get Started with Windows SharePoint Services!". Creating items in Announcements list in the onet.xml file is pretty straight forward but to create html links in a links list you would have to use the following format: <Field Type="URL" Name="URL">http://<url>,<description></Field> An example of a predefined links to google is as follows:

<Data>
    <Rows>
        <Row>
            <Field Type="URL" Name="URL">http://www.google.com, Google search</Field>
            <Field Type="Node" Name="Comments">Navigate to Google Site</Field>
        </Row>
    </Rows>
</Data>

Seems easy enough once you get the syntax right, how about something more fancy like adding folders? The following is an example of the syntax for adding a folder using CAML in onet.xml

<Data>
    <Rows>
        <Row>
             <Field Name='ContentTypeId'>0x0120</Field>
             <Field Name='FSObjType'>1</Field>
             <Field Name='Title'>Folder1</Field>
             <Field Name='LinkTitle'>Folder1</Field>
         </Row>
    </Rows>
</Data>

As can be seen, CAML can be a pretty powerful tool although at times rather cryptic, a while ago I saw a presentation by Eric Shupps (SharePoint MVP, www.sharepointcowboy.com - american cowboy rather than a dodgy British cowboy ;) he mentioned several SharePoint "Emoticons" like 0;# _x0020, -1001 and ows_ which if you develop for SharePoint you know what it's all about - nice to see someone come up with a SharePoint joke like this :)

 

 

Posted On Monday, August 25, 2008 11:57 AM | Comments (14)
Being practical

It's great to see photos that capture so well certain cultures such as Thailand, Thomas Kalak did a good job at this in his book "Thailand - Same same, but different!" (via KK) The following photo reminded me of the time of being a coffee addicted kid, sipping away at some ice cold coffee through a straw from a plastic bag. (The yellow sign says: do not litter). Also by Thomas, some unique old cars in Cuba.

Plastic bag as a substitute for plastic water bottle

Posted On Wednesday, August 13, 2008 11:19 AM | Comments (1)
Bad day in the office

If you are having a bad day in the office, the following video might cheer you up as it shows how an IT guy could be having an even worse day. An IT personnel do not always have access to see all system status/server room webcam etc. as this video depicts which makes the job a waiting game sometimes. It's no wonder iPhones are so popular as 'it just works', keeps users happy and lighten the work of technical support.

http://www.thewebsiteisdown.com

 

 

Posted On Saturday, August 2, 2008 11:45 AM | Comments (1)



Search this Blog via
Google Search This Blog

Tag Cloud