LinkUrl for events retrieved from cqwp is wrong

Posted on 2010-01-01
Last Modified: 2012-05-08
I am trying to display events in my content query web part with custom xslt file. I want to provide a link to the event and so I have used the LinkUrl from within the xslt to get the url. But this is returning a wrong url. It is of the format http://mysiteurl/Lists/ListName/1_.000 which is wrong. Could anyone have any experience with this kind of issue?
If someone has tried to display events within a content query web part, then probably you might have experienced this.
Question by:sharepointuser
    LVL 3

    Expert Comment


    Author Comment

    In the example he is using the LinkUrl itself to get the url, but in my case it is not working. As I have mentioned above I am getting the url as http://mysiteurl/Lists/ListName/1_.000 .
    I have tried it and it works with items in the Pages library. It does not work with Calendar or Events. Maybe we have to use some other attribute. Please let me know if you have an idea on this.
    LVL 9

    Accepted Solution

    Instead of LinkURL, try a string concat of the following:

    "http(s)://yourserver/" + item.Path + "/DispForm.aspx?ID=" + item.ID

    You can change DispForm.aspx to whatever display form you want to use.

    Author Comment

    can we do this from xsl? could you please provide some code sample for the same?

    Author Closing Comment

    Thank you. I will try this out from xslt.

    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    Suggested Solutions

    Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
    I have just recently built a new SharePoint 2007 farm on a complete Windows 2008 R2 server platform and part of my standard build procedure is to implement a warm up routine, usually in the form of a script that is scheduled every morning to launch …
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    This video discusses moving either the default database or any database to a new volume.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now