November Happy Hour will be moved to Thursday December 5th.

Entering a value for multiple pages

Vote:
 

Hello

I am currently helping a company populating a website and they are using cms 5.0

Currently there are 50 pages of a certain page type which needs to be extended with two new fields, one string and one url. This two fields have the same value for all pages of this page type and I want to find an easy way of giving all these pages the same value. I tried creating the new field with a default value but it seems like it only gives this the default value to new instances of the page type. Also it says that the value entered is invalid for urls even though it is written exactly as it is shown for when I enter the value the proper way 1 by 1

Also what does the "inherit value" mean when creating a new field.

#24101
Sep 24, 2008 11:38
Vote:
 

Hi Jon!

As "defualt value" and "inherit value" both apply to creation of _new_ pages only, they wotn help youout in this situation.

The only way to accomplish what you want would be to do this programmatically (or possibly directly in the database, but I strongly advise against that!) by looping through a collection (FindPagesWithCriteria, filter by PageType) and for each returned PageData apply the value and then save it back through DataFactory.

/johan

#24102
Sep 24, 2008 11:58
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.