custom page attributes - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

custom page attributes

  • custom page attributes
  • Hi,

    I am developing a custom navigation control that alows us to manage the menu as we need, but now I have to show a footer menu, and there i have to show some of the hidden pages,  at the moment I have to put on the Keywords a specific keyword to do the trick, but I think it would be usefull to have a custom proprieties param at the page Title & properties, this could be acomplished by a table that saves a kind of dictionary(Key, Value).

    If it is already something on Sitfinity to do it, I would be glad to know how.

    thanks in advance.
  • Hi Paulo,

    You can create the a custom fileds form PageData programmatically

    App.WorkWith().DynamicData().Type(typeof(PageData)).Field().TryCreateNew("MyPageDataField", typeof(string)).SaveChanges(true);
    var dynamicContent = App.WorkWith().DynamicData().Fields().Where(dc => dc.FieldName == "MyPageDataField").Get();
    var pg = App.WorkWith().Pages().Where(pk => pk.Name == "somename").Get().SingleOrDefault() as PageNode;
    pg.Page.SetValue("MyPageDataField", "somevalue");

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  • Hi,

    Thanks for the quick answer, but I cannot do it dinamically unless I know the pages to associate the new attribute.
    The problem is:

    step 1: user add a New Page to his sitefinity site
    step 2: user set the title, description and that the page will not dislay in navigation
    step 3 : user "Needs" to say that his new page must appear in footer.

    The Step 3 is what I need, and perhap's you guys could add a field\grid in title & proprieties of the page where the user could specify some  custom parameters...  "And on saving you could associate it to the page created".

  • Hello Paulo,

    We will have UI for custom fields after the official release - Q1-Q2 2011. This will allow you to add custom data from the UI as you can do this for the other content items.

    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  • Hi Ivan,

    I have programmatically added the custom field for the pages. Now how can i add the ShowInFooter checkbox to the page properties UI and how do I store the value ? 

    I was able to extract the templates from Sitefinity.Resources:


    I also noticed that the class for the view is PagePropertiesView with 2 constants CreateDialogTemplateName and EditDialogTemplateName. What i am thinking is to override the PagePropertiesView class but I need to change the templates from embedded to the external templates and I need to tell sitefinity to use my CustomPagePropertiesView instead of PagePropertiesView.

    I hope i am going in the right direction.


  • Hello George ,

    You could try to inject custom controls in the page definition Telerik.Sitefinity.Modules.Pages.PagesDefinitions. Since there is no out of the box you need to replace the definition. You might find this post useful

    Ivan Dimitrov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  • Hi Ivan,

    It would be great if this would be supported in the UI?
    Just like on a contentitem it would be nice to have taxonomies on a page.

    Maybe an item in PITS so that we can vote for this?

  • Hello Daniel,

    Thank you for getting back to us.  Your request is added in our PITS system where you can vote for it. Please use the following link:

    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  • this makes me sad... y u no put custom fields on pages :(