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"
);
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.
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
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
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
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
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 >>
this makes me sad... y u no put custom fields on pages :(