SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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

Have you tried using the variable $SafeLinkUrl?

share|improve this answer

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

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.