Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Query web part

  Asked By: Willis    Date: May 14    Category: Sharepoint    Views: 865

I'm trying to set up a site with subsites consisting of project
workspaces. Easy enough. But on the parent site, I need to have a
list of all the project sites so all of the projects are visible in
one place (there are actually multiple sites that will contain
project sites underneath the master, I need to aggregate all of
them).

I've been playing with the content by query web part and I'm pretty
close. I found info on pointing it to the site directory, then
changing the servertemplate it looks for to the number 300:
<property name="ListsOverride"
type="string">ServerTemplate="300"</property>

I also changed this:
<property name="CommonViewFields" type="string">URL,URL;</property>

as was done in the following forum:
http://forums.microsoft.com/MSDN/ShowPost.aspx?
PostID=1662848&SiteID=1

Finally, I added a custom section to the itemstyle.xsl:
<xsl:template name="Sites" match="Row[@Style='Sites']"
mode="itemstyle">
<xsl:variable name="DisplayTitle">
<xsl:call-template name="OuterTemplate.GetTitle">
<xsl:with-param name="Title" select="Title"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="SiteUrl">
<xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
<xsl:with-param name="UrlColumnName" select="'URL'"/>
</xsl:call-template>
</xsl:variable>
<div id="linkitem" class="item">
<div class="link-item">
<div class="LinkInfo">
<a href="{$SiteUrl}"><xsl:value-of select="@Title"/></a>
</div>
</div>
</div>
</xsl:template>

So far it works except for the following:
*The links all point to the master site
*It pulls back all the sites (I need to filter it somehow for the
project sites, it could even be text based as they'll all contain a
similar naming convention)
*I'd prefer not to edit the itemstyle.xsl page but to create a
custom one instead and reference it here:<property name="XslLink"
type="string"/>, but it won't work!!!

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Query web part Or get search suggestion and latest updates.




Tagged: