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 cant seem to get my custom CQWP to link to a list item. If i look at everything exposed in the CQWP (using the showxml trick) the only thing close is the LinkURL which takes the format http://servername/Lists/listname/1_.000 but that does work.

I could build the link myself using the ID but found it strange an actual link wasnt exposed.

David

share|improve this question
add comment

4 Answers 4

Im not 100% sure what you mean, if you are talking about using your own template in ItemStyle.xsl with CQWP then the template OuterTemplate.GetSafeLink from ContentQueryMain.xsl "expose" the URL. The $SafeLinkUrl variable mentioned in the other answer uses this template in all the the predefined templates in ItemStyle.xsl. Just copy and paste that one.

share|improve this answer
add comment

I had the exact problem. Set the property UseCopyUtil of content query webpart to true I thing the call to OuterTemplate.GetSafeLink in ContentQueryMain.xsl will only return the safe link from a Link Column data type

share|improve this answer
add comment

Have you tried using the variable $SafeLinkUrl?

share|improve this answer
add comment

try using @LinkUrl direct in your href something like:

some text

or to use $safelink create variable first

<xsl:variable name="SafeLinkUrl">
        <xsl:call-template name="OuterTemplate.GetSafeLink">
             <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
        </xsl:call-template>
   </xsl:variable>

thenk you can use $safelink in your herf code.

Hope this helps

share|improve this answer
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.