custom page attributes

Posted by Community Admin on 05-Aug-2018 09:54

custom page attributes

All Replies

Posted by Community Admin on 07-Jan-2011 00:00

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.

Posted by Community Admin on 07-Jan-2011 00:00

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.

Posted by Community Admin on 07-Jan-2011 00:00

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".

Thanks.

Posted by Community Admin on 07-Jan-2011 00:00

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.

Regards,
Ivan Dimitrov
the Telerik team


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

Posted by Community Admin on 16-Feb-2011 00:00

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:

Telerik.Sitefinity.Resources.Templates.Backend.Pages.CreatePagePropertiesView.ascx
Telerik.Sitefinity.Resources.Templates.Backend.Pages.EditPagePropertiesView.ascx

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.

Best,

G

Posted by Community Admin on 22-Feb-2011 00:00

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

Regards,
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!

Posted by Community Admin on 06-Sep-2011 00:00

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?

Regards,
Daniel

Posted by Community Admin on 09-Sep-2011 00:00

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:  http://www.telerik.com/support/pits.aspx#/public/sitefinity/7789


Regards,
Antoaneta
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 >>

Posted by Community Admin on 13-Mar-2012 00:00

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

This thread is closed