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

selected/not selected default value

Vote:
 

Hi all,

I would like to set a default true value for the EPSUBSCRIBE property so that any pages created from a certain pagetype, will be subsribable by default. This way the editor doesnt have to select the property in edit mode for all instances of the page type.

any help on how to do this will be greatly appreciated.

Thank you

#44672
Oct 12, 2010 14:59
Vote:
 

Hi, this you can do in Admin mode by editing the property in its page type you want to set the default value for.

Admin->Page types->[Your page type]->[Your property]->Default value = true

Btw, this is a good resource for these types of questions: http://webhelp.episerver.com :)

#44678
Edited, Oct 12, 2010 16:11
Vote:
 

Hi tobias,

 

thank you for your response. I actually tried this before but when I visit the actual page in edit mode, the checkbox is not selected. i.e.) in admin mode, I set the default value of the property to 'true'. When I then go into edit mode for a page of thispagetype, the checkbox is not selected.

 

When I then run the following code: 

 

foreach (PageReference reference in hdb.FindPagesWithProperty(PageReference.StartPage.ID, "EPSUBSCRIBE", "EPSUBSCRIBEHIDDEN", null))

 

... i dont get anything returned as the checkbox is not selected and the value is therefore not true.

Any ideas?

 

 

 

#44686
Oct 12, 2010 18:18
Vote:
 

I managed to figure out why this is the case. Setting a default value for a property only takes effect for all newly created instances of the containing pagetype. Therefore, those pages that already exist of this pagetype, dont get the default value for the property.

Thank you.

#44687
Oct 12, 2010 18:24
* 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.