Problems while developing with PageTypeBuilder

Vote:
 

Hello!

 

I'm using pagetypebuilder for the first time on a CMS6 R2 project, so I'm completely new to the library.
I'm facing two problems and i can't manage to find the solution.

1- If I change anything on the definition of the pagetypes, or properties, no matter how many times i build and rebuild the solution, the page types in admin mode are not updated, unless i remove the entire page type and then reload admin mode, which is annoying.  So, shouldn't this update happen automatically? is there anything that should be set, or some cache that should be disabled?

2- My second issue is about the order of the properties. I have a base class for the page types, and i want those properties to be the first ones listed when the page type is compiled, but they are actually the last ones. How can i change this in the code?

Any help or hint will be highly appreciated!

 

/Kenia

#55311
Nov 28, 2011 11:42
Vote:
 

Not sure about question one. Are you sure it is not syncing at all? Some changes to your class won't be reflected by the page type in admin mode, for example if you remove a property in the class it won't be removed on the page. Adding a property should be reflected.

You can set the sort order in the PageTypeProperty attribute, like so:

[PageTypeProperty(SortOrder=400)]
public string Heading {get; set;}

#55313
Nov 28, 2011 13:32
Vote:
 

Hello! Thanks for your reply.
I'll try setting SortOrder on the properties.
About the first question,  what is happening is that I have changed the types in some properties and it hasn't been reflected at all. Is this the behaviour also when editing attributes on a certain property?

#55314
Nov 28, 2011 13:49
Vote:
 

well, it seems the best solution i have found is to delete the specific property and then reload CMS after compiling the project with the new definition. Still a little uncomfortable, hope they improve this about the updates in version 2.

#55331
Nov 29, 2011 9:17
Vote:
 

Kenia, it's by design. If it would convert the property automagically when you change it in code you can loose a lot of data if you do it wrong. Check out this plugin if you want to make it easier: http://world.episerver.com/Blogs/Lee-Crowe/Dates/2011/7/Introducing-Page-Type-Builder-UI/

#55332
Nov 29, 2011 9:35
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.