Hot answers tagged

28

I expect you have "BaseViewID" attribute set to "0" on the "View" element of your custom list definition. You should change this attribute to some other value (in range 1..255) and the problem should vanish then. Although this is actually all you need to solve the issue, I anticipate you might want some more detailed explanations :) Actually, BaseViewID is ...


10

It depends on what you want to do with it. The power of using JSLink is that it uses JavaScript and runs in the client and you can use all the powerfull JavaScript libraries and for its easy to debug. It is easy to change the fields appearing and add some nice functionality to views. The weakness however is that JSLink runs in the client and it depends ...


10

Use the following URL to get XML of list:- http://{0}/_vti_bin/owssvr.dll?Cmd=Display&List={1}&XMLDATA=TRUE {0} – The URL to your site. This could be the root web or a child site. {1} – The GUID for your list. To find the GUID for a list, just go to the Settings page for the list and copy it from the URL. Use the following URL to get XML of ...


9

I'm not sure if XSLT 1.0 have today's date method. However, XSLT 2.0 has an equivalent current-date() Have you tried? ddwrt:Today() <xsl:value-of select="ddwrt:Today()"/> ddwrt:TodayIso() <xsl:value-of select="ddwrt:FormatDateTime(ddwrt:Today(),1033,'yyyyMMdd')"/>


8

When you add a DVWP to the page in SharePoint Designer, SPD defined a variable which contains the current date for you in the ParameterBindings section: <ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/> Be sure to declare Today as a param at the top of the stylesheet: <xsl:param name="Today" /> Then you can ...


7

You can filter list by using CAML and DaysOffset attribute of the Today tag. This can be done even from GUI. For example, this filter will narrow the shown items of a list view to those, which have Due date within a week from the current date: (List Tools => List => Modify view on the contextual ribbon) In terms of CAML, this will produce the following ...


7

There are just a few easy steps to follow in order to customise you blog page, the best way is to edit the blog.xsl file responsibl of rendring the blog posts. The standard SharePoint 2010 default page looklike : Assuming that you have already created a blog site, let's go to the 14 hive of your server and edit the blog.xsl file. C:\Program Files\Common ...


6

The format of the Image with formatting and constraints for publishing is already with the image HTML tags. Ex.: <img alt="" src="Docs/Image.png" style="border: 0px solid" /> So you could try to do the following: <xsl:value-of select="substring-before(substring-after(@ImageField, 'src=&quot;'), '&quot; style')" />


6

PROBLEM SOLVED :-) :-) The bug of trying to set the xsllink property through the template seems to be a recognised bug. I'm even sure MS are aware of this as when looking at how they have created their site definitions it seems pretty uninstinctive. The Solution DO NOT SET OR DEFINE THE XSLTLISTVIEWWEBPART IN THE TEMPLATE instead just define a webpart ...


5

When you change a page in SPD, it becomes customized (unghosted). Thus, GhostedXslLink no longer works. More details about ghosted and unghosted pages here: http://www.etechplanet.com/blog/ghosted-and-unghosted-pages-in-sharepoint.aspx You should use XslLink property instead of GhostedXslLink for unghosted pages. Just change it in the property editor in ...


5

In order to define Custom Rendering for a SPFieldChoice in template for mode attribute should be used value body For example, if we apply for Tasks list that contains Status field (SPFieldChoice) the following XSLT style sheet <xsl:template match ="FieldRef[@Name='Status']" mode="body"> <xsl:param name="thisNode" select="."/> <xsl:...


5

You don't need to manipulate the web part settings manually in the code. These settings are also available on the ribbon. Select the DVWP in SharePoint Designer 2010 in Design View and then use the Paging command on the Options ribbon of the Data View Tools:


4

This happens when path of your xsl used by CQWP for rendering items is referring the source site collection from which the content was migrated. You may want to open the webpart file and make sure you are using relative path so that it always refer to same site collection in which it is being used.


4

[There was a not useful answer] UPDATE: OK, I understand the problem now. In my case the field is present in the section (I've removed other fields for simplicity): <DataFields>@MultiLookupTest_x003a_TestField,MultiLookupTest:TestField;</DataFields> And then you can render it just in the same manner as others but you need to use a part of ...


4

Are you just doing this on a field by field basis? If so then you can override the rendering template for a particular field using fldtypes.xsl files. Drop these into templates/layouts/xsl and they magically work. So if you had a custom field called MyBigField, you can define an XSL just for displaying that field value in a list. More info here:- http://...


4

The RenderPattern is obsolete starting from version 14 (SharePoint 2010). So, RenderPattern does not affect how Field is rendered in List View. In order to define Custom Rendering for a Custom Field, please see How to: Customize the Rendering of a Field on a List View Brief description. Create XSLT style sheet for rendering a custom field type. In your ...


4

See if this helps: <xsl:for-each select="rows\row"> <li> <a> <xsl:attribute name="href"> <xsl:value-of select="{@FileURL}" /> </xsl:attribute> <xsl:attribute name=...


4

Just replace 2057 with 1036 (the LCID of fr-FR) and it should render the date in a French format. The possible values for the third parameter, which control what type of date string is rendered, are listed in the MSDN blog post “Custom Date Formats in SharePoint XSL”.


4

If you can add a script editor, you can do something like this: So the heading is complete 20px. If you want this for only one column you have to use the developer tools (F12) to find your element. Hope this gives you a starting point. Update 1: Here where I found the class:


4

There is no issue with the equals sign, the issue is with the ampersand, that has to be escaped as &amp; https://stackoverflow.com/questions/1328538/how-do-i-escape-ampersands-in-xml There are 5 characters that need to be escaped in XML: " &quot; ' &apos; < &lt; > &gt; & &amp; https://stackoverflow.com/...


3

Sharmila, You cannot get the Description of the column, in DataViewWebpart, since the description which you provided becomes part of Field Description Attritbute, and the value of the Field becomes part of SPList Item.


3

Original root template for XsltListViewWebPart comes from 14/TEMPLATE/LAYOUTS/XSL/vwstyles.xsl file. The code is as follows: <xsl:template match="/"> <xsl:choose> <xsl:when test="$RenderCTXOnly='True'"> <xsl:call-template name="CTXGeneration"/> </xsl:when> <xsl:when test="($ManualRefresh = 'True')"> ...


3

The CQWP renders the datatable columns as attributes of the row element so you would use the @ symbol to reference them in your XSLT as opposed to parameters or variables referenced using the $ symbol and elements referenced without any symbol


3

Inside your RootTemplate (name="View_Thread_Default_RootTemplate"), you have <xsl:attribute name="class">, but you cannot use xsl:attribute without a parent tag. That is what causes the error. To fix it, you should either remove the <xsl:attribute> tag, or wrap it to some HTML tag (i.e. <div>). After wrapping to <div>, the error ...


3

Having read up on the interwebs, I came across this (awesome) post: Overriding the presentation of an xslt listview webpart which basically covers how to do what I was trying to achieve. The steps I took to get this right are as follows: Open up the page in SharePoint Designer and grab the xslt of the listview Save xslt into a .xsl file Update the ...


3

Your template matches a FieldRef element, and inside the template you're trying to get the field value as an attribute of current element (i.e. FieldRef). But the FieldRef element basically doesn't have any columns. It itself represents one column and contains some of it's properties. Ordinary FieldRef element looks as follows: <FieldRef Name="Author" ...


3

I was able to do it by modifying the ContentQueryMain.xsl file to insert non-repeating markup before and after content query as shown here. http://blog.mastykarz.nl/wrapping-contents-content-query-web-part-additional-markup/


3

I believe it is related with invoking template for a field, it means that in your case this template is not invoked at all. In order to render field using your template the following attributes should be specified in template: a) mode DateTime_body b) match(matches field by internal name in that case) <xsl:template name="FieldRef_DateTime_body....


3

This article describes how to do it. I had a need to view the raw XML being generated from a Content Query Web Part today, so I could see exactly what data was being returned in each column. This is how to do it. The PublishingResources feature of MOSS2007 contains a file entitled ContentQueryMain.xsl, which is the primary stylesheet for the ...


Only top voted, non community-wiki answers of a minimum length are eligible