0

I have a SharePoint site that is being used to manage developments - each project has a designated page, which follows a set layout. To support this, we have defined a template page which is duplicated for each project. Each project / page also has a corresponding folder in the sites document library:

-Site Pages

  • Project 1
  • Project 2
  • Project 2

Document Library

  • Project 1
  • Project 2
  • Project 3

Within these folders, there are then sub-folders for different aspects i.e. documentation, user guides etc (page titles and folders are always identical).

What I' am trying to do is update the template page, using a Highlighted Content web part and a CAML query, to focus on the correct folder in the document library, based on the page title (page titles and folders are always identical), something like this:

<View Scope='RecursiveAll'>
<Query>
    <Where>
      <Contains>
         <FieldRef Name='FileDirRef'/><Value Type='Lookup'>**{page.title}**</Value>
      </Contains>
    </Where>
</Query>
</View>

But it isn't working. If I hardcode the value for {page.title} then it works as desired but I'm trying to avoid people having to update these web-parts. Ideally I actually want it to focus on the sub-folders i.e. Project 1\Documentation etc.

Any help would be amazing.

Cheers

mc

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.