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

How to create a common property for all page types

Vote:
 

Hi,

We are using EPiServer CMS 6 R2.All the page types and pages are created from EPiServer CMS Admin & Edit mode, but not using PageTypeBuilder.

When we have to create a common property for all page types, Is there any simple way to do it, instead of creating the property to all page types one by one?

Thanks.

#76122
Oct 17, 2013 12:18
Vote:
 

How about using the PageType and PageDefinition (the class representing the Property found on a PageType).

Iterate through all PageTypes, update each and save.

#76128
Oct 17, 2013 13:34
Vote:
 

There is a nice tool for this over at EPiCode. PageTypeUtil https://www.coderesort.com/p/epicode/wiki/EPiPageTypeUtil/About

#76129
Oct 17, 2013 14:02
Vote:
 

Hi Nergård,

I downloaded the files.

When I opened the Page Type Util in Admin mode it is giving error as :

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /EPiCode/PageTypeUtil/Plugins/pagetypeutil.aspx

And this path is alos from the DLL, so, I can't check for the issue.

Any other way to proceed further.

Thanks.

#76135
Oct 17, 2013 15:55
Vote:
 

Hi Nilsson,

Can you please give some more info on how to do this with a PageType and PageDefinition ?

Thanks.

#76136
Oct 17, 2013 15:58
Vote:
 

Kishore: Seems that you miss some files. Did you download the compiled CMS6 version?

It's an EPiModule which you install through the EPiServer installation mangager.  

If you want it's possible to rename the file from .epimodule to .zip and extract the files.

The module contains two folders (bin and EPiModule) just copy both of these into your EPiServer site and it should work.

What Alf talks about is to use the EPiServer API to programatically add the properties. This is what PageTypeUtil does and some other stuff thats nice to have when working with properties in older EPiServer versions so I would try to get it running instead of writing your own program.

/Per

#76140
Edited, Oct 17, 2013 17:06
Vote:
 

Hi Per,

Thanks for the reply.

I downloaded the fioes from the link :

https://www.coderesort.com/p/epicode/wiki/EPiPageTypeUtil/Download

And As you said I extracted the files , added the files to the sollution and added the DLL to the references and build it.

But, I haven't tried by installing through EPiServer Installation module, since we have many development instances wotking in the same instance.

 

 

#76151
Oct 18, 2013 8:52
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions 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.