Question

In an ONET.XML file I build a page with a CQWP. The CQWP has a WebUrl property is there a way to set this to alway be the the current web?

I tried this but it didn't work.s

<AllUsersWebPart WebPartZoneID="g_LeftCell" WebPartOrder="1" >
      <![CDATA[
      <webParts>
...

<property name="WebUrl" type="string">~Site</property>
Was it helpful?

Solution

Both ~SiteCollection and ~Site are valid tokens.

<property name="WebUrl" type="string">~sitecollection</property>

for root site or

<property name="WebUrl" type="string">~site</property>

for current subsite

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top