0

I have been asked to modify our project portal site to include the project name on each page at the top (we have about 25 pages in the site and we don't want the administrator to have to manually add the values on each page).

We have a "Project Setting" list that includes the ProjectCode, Project Name, and Project Description. There is only one row in this list as each project will get their own "list."

What we would like is to add the "Project Name" information to the top of each of our pages (right now we have content editor web parts with hard-coded text).

For example, what we would like is to have "Project Name - dynamically created based on the project setting list" then the #Page Name# (hard-coded) - for example "Top 10 Project - Calendar". We want to "template" the site and the hard-coded part of the pages will never have to be renamed.

I have read that this is "possible" using JavaScript and have tried to figure that out (with not much luck).

2

First thing I want to mention here is the use of list for just 1 item. This is not the way to go. You can use site properties (property bag values) to manage this situation. You can create 3 properties and update values to it. It will save storage and improve performances.

You can find in this article how to query property bag values using JavaScript CSOM and add them to master page. If the requirement is not the master page, you can use the same code in the page layout too.

  • 1
    Thank you for the point in the right direction. I added the information to the "property bag" (didn't even know it existed) and now I am calling it on every page dynamically! Hope you had a great long weekend. – brent.fraser Sep 2 '14 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.