6

You can use following code in the display template <div title="_#= $htmlEncode(line4.defaultValueRenderer(line4)) =#_" id="_#= line4Id =#_"> _#=STSHtmlDecode(line4.value)=#_ </div> Source - https://ingessharepointnotes.wordpress.com/2014/03/04/sharepoint-display-templates-display-enhanced-rich-text-field/ Another example var desc = $...


5

Content By Query Web Part is XSL based, by default, Title, Description, ImageUrl, and LinkUrl columns (if present) of the items that the query returns are rendered. The Web Part renders the ImageUrl column and the LinkUrl column as an image and as a hyperlink, respectively. If you want to query for custom content types and render specific columns from ...


5

Full Image url is available in property EncodedAbsUrl You can change the webpart property and set this.


5

function copyFiles(sourceLib, destLib){ var context = new SP.ClientContext.get_current(); var web = context.get_web(); var folderSrc = web.getFolderByServerRelativeUrl(sourceLib); context.load(folderSrc,'Files'); context.executeQueryAsync( function() { console.log("Got the source folder right here!"); var files = folderSrc.get_files(); ...


4

Following snippet can be used to reference the jQuery in your XSLT webpart. Inline Script Block: <xsl:text disable-output-escaping="yes"> <![CDATA[ <script type="text/javascript"> (your JavaScript code here) </script> ]]> </xsl:text> Script Reference Block: <xsl:text disable-...


4

You wanna target the specific webpart where you wanna change the link color, otherwise every link on the page will change font color. Use F12 Developer tools to find the ID of the specific webpart you wanna change the link text for. Insert the name/ID instead of my example (#WebPartWPQ5) and then use the CSS i provided below (SP2013). <style type="text/...


4

Yes you can use CQWP to show the completed tasks through last week by filtering the following: The [Task Status] column equal to Completed Once the task set to completed, the [Modified Date] will be changed to the current date, so you can filter the updated tasks within last week as the following The [Modified Date] Greater Than or Equal to [Today]-7 The ...


3

The CQWP certainly should do what you are looking for. My first suggestion is to check your settings. When I do this I usually sort by Modified date in descending order so the most recent are at the top. I then set a maximum number of items - maybe 10 or 15 so there are not too many. If you need to display more details then you will need to customise the ...


3

About Social Comments In comparison to page fields (Page Content, Title, Page Image and etc.) that are inserted into the “slots” of the page layout and associated with the content type of the publishing page, social comments are stored separately. Social comments are stored in separate DB and the comment entry is associated by the page Url on which ...


3

You can use the XSLT <xsl:sort> element to customize your sort order. https://sites.google.com/site/icsharepoint2010/xslt/sorting-in-xslt <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:template match="employees"> <xsl:apply-templates> <xsl:...


3

You will need to create some custom XSLT which will allow you to present whatever fields you like. If you need a steer on this there are a couple of blog posts which may help - http://paylord.wordpress.com/2012/09/28/cqwp-and-xslt-part-1/


3

Modifying the underlying XSL files worked in SP2010: http://blog.kappasolutions.ca/blog/post/2010/09/12/How-to-Display-HTML-in-Content-Query-Web-Part.aspx Specifically, setting disable-output-escaping to yes in ItemStyle.xsl. ie. <xsl:value-of select="@Something" disable-output-escaping="yes" /> I haven't tried it in 2013 yet, but this article ...


3

I understand this is an older post but I was struggling with this same issue over the past couple days and have found a solution I thought I would share. The trick is in understanding how the CQWP actually builds the XML structure. You can see this by editing the ContentQueryMain.xsl (found at /Style Library/XSL Style Sheets) by adding a new template that ...


3

From MSDN for SharePoint 2013. If you want complete control over how a Web Part appears on your site, and if you want that Web Part to appear on all pages of a certain type, add the Web Part directly to a page layout. If you want a Web Part to appear on all pages in a site, you can also add a Web Part directly to a master page. Try with this ...


3

In SharePoint Designer you can edit a page layout and create a CQWP. If you need to customise the CQWP, you probably need to export it, edit it, and import it again. But unlike the SharePoint browser interface, SPD does not have a command to import a web part. You can do this: Create the CQWP on a web part page. Export it, modify it as desired, then import ...


3

Alternative to editing your xsl style sheets you can try this: Add the code below to a script editor web part or save this in a text file and use a content editor web part to load that file on your CQWP page. <style> li.dfwp-item div { background-color: cornflowerblue; margin-bottom: 2%; text-align: center; } li.dfwp-...


3

When you use QueryOverride, you can no longer modify all query related values using a browser. So you will need to fix the query, reupload the webpart, and repeat those two until you have a working web part. Use the internal Field name, yours look like the display name which won't work. For Content Type filtering, best is to use ContentTypeId. <...


3

You could export the content query web part and open it in notepad. Then define the MainXslLink and ItemXslLink property values as "/rootsite/subsite/style library/xsl style sheets/Xslfile name.xsl" in the content query web part. And you also could change the url of the xsl file. Make sure there is a major version of the published xsl. There is a similar ...


3

You can turn audience targeting on the list. Go back to each of the files and target them to the appropriate audience and then just use one webpart that honors the audience targeting. You can better idea from steps mentioned in below MSDN article. Target list or library items to an audience Please check the content for Target list or library items to an ...


2

Use ; instead of , in your query and also delimit the last column too with ;. It will help you solve the problem.


2

You can group your items using Muenchian Method: Put this line outside of the xsl templates: <xsl:key name="ByDate" match="Row" use="@YourDateColumn"/> And draw your items like this: <xsl:for-each select="//Row[generate-id() = generate-id(key('ByDate', @YourDateColumn)[1])]"> --- Draw group header --- <xsl:for-each select="key('...


2

I managed to figure it out. If anyone is curious, here's what I did: Export your CQWP. Open in SPD. Search for the CommonViewFields tag and put in your column name there. Search for the AdditionalFilterFields tag and put in your column there.' Save the web part and import it to your page. The new field should appear in the filter list.


2

We can use CQWP to show it as ListView, Refer the below steps: Edit ContentQueryMain.xsl file Search <xsl:template name="OuterTemplate.Body"> Change it as: <xsl:call-template name="OuterTemplate.CallItemTemplate"> <xsl:with-param name="CurPosition" select="$CurPosition" /> <xsl:with-param name="LastRow" select="$LastRow" /></...


2

Templates defined with mode="header" attribute (file Header.xsl) are invoked only when the Grouping is enabled for CQWP (see picture below)


2

You need to edit the guts of the CQWP and use the ViewFieldsOverride setting to introduce the ListProperty in the view fields. If you need the Site name, also include ProjectProperty. You can then use ListProperty.Title and ProjectProperty.Title in the XSL. There is a little tutorial here: http://sharepoint-tweaking.blogspot.co.nz/2008/04/displaying-...


2

You can use a list view web part and enable inline editing for the list view. Then you can click the edit icon to change fields without opening the item in the list form. With Inline Editing enabled, you can see an edit icon when you hover over the item's link field. Click the edit icon and all fields of that item will turn into edit mode. Controls like ...


2

When no results found the template OuterTemplate.Empty is rendered for CQWP by default: <xsl:template name="OuterTemplate.Empty"> <xsl:param name="EditMode" /> <xsl:if test="$EditMode = 'True' and string-length($cbq_errortext) = 0"> <div class="wp-content description"> <xsl:...


2

Now add a fresh CQWP to your page and then export it. Save the generated file and open it in notepad. Locate property ItemXslLink and replace it with following: <property name="ItemXslLink" type="string">/Style Library/XSL Style Sheets/CustomItemStyle.xsl</property> Locate property ItemStyle and replace it with following:<...


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