Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I wrote this code in itemstyle.xsl

    <xsl:variable name="AssistPrinEmail">
        <xsl:value-of select="substring-after(@AssistantPrincipal1Email,',')" />
    </xsl:variable>
    <xsl:variable name="AssistPrinEmail2">
        <xsl:value-of select="substring-after(@AssistantPrincipal2Email,',')" />
    </xsl:variable>
    <xsl:variable name="AssistPrinEmail3">
        <xsl:value-of select="substring-after(@AssistantPrincipal3Email,',')" />
    </xsl:variable>
    <xsl:variable name="AssistPrinEmail4">
        <xsl:value-of select="substring-after(@AssistantPrincipal4Email,',')" />
    </xsl:variable>

I would think that four slots would appear in a CQWP using that style. They would be AssistantPrincipal1Email, AssistantPrincipal2Email, AssistantPrincipal3Email, and AssistantPrincipal4Email. This is not the case. The slots are not appearing in the toolbar.

Any idea why these slots are not displaying?

share|improve this question
add comment

1 Answer 1

Did you try:

<xsl:variable name="AssistPrinEmail" select="@AssistantPrincipal1Email"/>

To make sure the slots are working without the 'substring-after' selection?

share|improve this answer
    
I tried that. What I eventually did was add the fields to the CommonViewFields section in the webpart xsl. That forced the fields to work. They still didn't appear as slots but at least the content worked. You shouldn't HAVE to do that, but CQWP and slots are buggy/broken in SP2010. I hope things get better with SP1. –  Brian Bolton Aug 22 '11 at 11:46
    
You also have to declare slots as variables at the FIRST level of the template, that's where the CQWP slots parser is expecting them. I know this is late to the party, but this works fine in SP1. –  James Love Apr 22 '12 at 9:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.