0

We have made some changes to the ItemStyle.xsl file for the style SPGrid in order to display a few extra columns using the Content Query Web Part. The ItemStyle resides on the highest level of the site collection as you may know.

Site Collection admins can perfectly see the changes, but other users cannot. The new columns are simply not displayed. Still, the ItemStyle file is checked in! What could be the reason of this and how do we resolve it? My hunch says this is a permission problem?

enter image description here

Edit 1: I have republished the ItemStyle. The users now see their items. However: now the rendering still doesn't happen properly. Users see LI whereas the template is based on TABLE elements and adds some headers too. What is causing this? Could it be that it is still requesting an old version?

Edit 2: I can make changes, they are reflected, but still all rows are wrapped in between LI tags for normal users. How is this possible? I also notice the groupstyle, which is default. Could this be different depending on the user permissions?

This is what is being done:

<xsl:template name="SPGrid" match="Row[@Style='SPGrid']" mode="itemstyle">
<xsl:param name="CurPos" /> 
<xsl:param name="Last" /> 
<xsl:variable name="SafeImageUrl">
 <xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
<xsl:with-param name="UrlColumnName" select="'ImageUrl'" /> 
 </xsl:call-template>
</xsl:variable>
 <xsl:variable name="SafeLinkUrl">
<xsl:call-template name="OuterTemplate.GetSafeLink">
<xsl:with-param name="UrlColumnName" select="'LinkUrl'" /> 
</xsl:call-template>
</xsl:variable>
<xsl:variable name="DisplayTitle">
<xsl:call-template name="OuterTemplate.GetTitle">
<xsl:with-param name="Title" select="@Title" /> 
<xsl:with-param name="UrlColumnName" select="'LinkUrl'" /> 
</xsl:call-template>
</xsl:variable>
<xsl:variable name="LinkTarget">
<xsl:if test="@OpenInNewWindow = 'True'">_blank</xsl:if> 
</xsl:variable>
<xsl:variable name="tableStart">
<xsl:if test="$CurPos = 1">
<![CDATA[           
     <table width="100%" class="ms-listviewtable" cellpadding="1" cellspacing="0"  border="0">           
     <tr class="ms-viewheadertr ms-vhltr">             
     <th class="ms-vh2">Title</th>             
     <th class="ms-vh2">Request date</th>  
     <th class="ms-vh2">Approval status</th>    
     </tr>
]]> 
</xsl:if>
</xsl:variable>
<xsl:variable name="tableEnd">
<xsl:if test="$CurPos = $Last">
<![CDATA[  </table> 
]]> 
</xsl:if>
</xsl:variable>
<xsl:value-of select="$tableStart" disable-output-escaping="yes" /> 
<tr>
<td>
<div class="item link-item">
<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate" /> 
<a href="{$SafeLinkUrl}" title="{@LinkToolTip}">
<xsl:if test="$ItemsHaveStreams = 'True'">
<xsl:attribute name="onclick">
<xsl:value-of select="@OnClickForWebRendering" /> 
</xsl:attribute>
</xsl:if>
<xsl:if test="$ItemsHaveStreams != 'True' and @OpenInNewWindow = 'True'">
<xsl:attribute name="onclick">
<xsl:value-of disable-output-escaping="yes" select="$OnClickTargetAttribute" /> 
</xsl:attribute>
</xsl:if>
<xsl:value-of select="$DisplayTitle" /> 
</a>
</div>
</td>
<td>
<xsl:value-of select="@RequestDate" /> 
</td>
<td>
<xsl:value-of select="@ApprovalStatus" /> 
</td>
</tr>
<xsl:value-of select="$tableEnd" disable-output-escaping="yes" /> 
</xsl:template>
  • has it been published? and check the permissions for style library – Harshini Hegde Dec 12 '13 at 10:20
  • when I check with them, to load the browser directly, they get another version. I will publish the file again and then see. Do we need to set specific permissions for users on site within site collection? I would be surprised! – Kris Van den Bergh Dec 12 '13 at 10:30
  • no you don't have to. It should work. – Harshini Hegde Dec 12 '13 at 10:32
  • Now it displays the different rows, but the heading (CDATA) is missing. As a result, the output and rendering looks entirely different. Upon doing a search the headers are not showing. – Kris Van den Bergh Dec 12 '13 at 11:10
  • something must be wrong with the XSL. What exactly is your requirement? – Harshini Hegde Dec 12 '13 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.