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 ...


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')"/>


9

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 ...


8

Actually you don't need to modify the OOTB files. In fact, it's a very bad idea, since Microsoft doesn't support modifying any of OOTB files in Layouts directory, except of DocIcon.xml. Any cumulative update or SharePoint service pack can replace these files, so your customizations will vanish in one moment. What you need to do, is to create your own file, ...


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

When you expand the group, the listview webpart does callback(and not postback) to retrieve the data. While callback, the value of url parameter is not passed (unless you set a default value) and so you don't see data. To make it work : 1) Right click webpart 2) Go to webpart properties 3) Under "Ajax Options", Check "Enable Asynchronous update" 4) Click ...


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

There's an attribute you add to xsl:value-of called "disable-output-escaping". So change your line to look like this: <xsl:value-of select="@MyColumn" disable-output-escaping="yes"/>


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

I am adding this so that others who stumble accross it might find it useful. I got this to work by adding a __redirect to the GenFireServerEvent like this: onclick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={WhateverPage.aspx?IsDlg=5'})" Then on this page add something like this: _spBodyOnLoadFunctionNames.push("closeme"); function ...


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

Responding to your sharepoint-designer tag, I'm afraid, there is no way to style mobile list views through SharePoint Designer. You should use RenderingTemplates for this purpose, as it is described on MSDN: http://msdn.microsoft.com/en-us/library/bb861936.aspx This way, you'll have to deploy a custom RenderingTemplate to the 14/template/layouts/...


3

Try using the "disable-outscape-escaping" property after xsl:value-of select="@YourField" like this: xsl:value-of select="@Body" disable-output-escaping="yes"


3

Replace your XSLT with the following piece of code (don't forget to backup ;)) <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <xmp><xsl:copy-of select="*"/></xmp> </xsl:template> ...


3

One way to fix this was to append a class on a tag surrounding the address, and then add display:inline to the nested DIV: .test div { Display:inline; } <DIV class="test">address: <DIV>123 main st.</DIV></DIV>


3

You have to disable output escaping by adding disable-output-escaping="yes" to the element. It is covered in this post on MSDN. http://blogs.msdn.com/b/ben_hickman/archive/2009/05/22/content-query-web-part-example.aspx


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


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