Predefined selectors for use in backend modules
Hi telerik,
It would be great if we could add predefined selector fields in the backend as a custom field.
Now you can choose for 'Short text', 'Taxonomies' etc., but it would be nice to have also:
- Page selector field
- Image selector field
- Multiple image selector field
Is this something worth for a new feature?
Regards,
Daniel
Hi Daniel,
Thank you for this suggestion. I will investigate this and probably will write a KB article or a blog post on how to achieve this in the next few days. Thank you again for your suggestion.
All the best,Hi Lubomir,
Any update on this? Would be nice to at least have a selector for the image field with use of the new image upload/crop/resize functionality.
Thanks!
Daniel
Hello Daniel,
I am still working on this. I hope by the end of the week I will have a blog post about how to use different selectors. I will see to it to have at least the new image selector described.
Kind regards,Hi Lubomir,
Still busy on the post?
I'm eager to see how I can use this.
Thanks!
Daniel
Hello Daniel,
I'm still on it. I think I will be able to post some posts during the weekend. Stay tuned.
All the best,Thanks for the blogpost.
Would you be so kind to explain how to register this field?
Thanks,
Daniel
Okay, never mind. Found it.
Is it also possible to use the LinkManagerDialog here?
Telerik.Sitefinity.Web.UI.LinkManagerDialog
So that we can also check external websites?
Daniel
Hi Daniel,
I was thinking about that - about making the dialog with two tabs - one for internal site pages and the other for external pages. The problem is how to store the selected value, since we have only one field and we have to distinguish the value stored in it.
You could also check this blog post by Josh Morales:
http://www.sitefinity.com/blogs/joshmorales/posts/11-10-05/selecting_sitefinity_4_content_inside_widget_designers.aspx
Hi Lubomir,
Hello Daniel,
I'm still working on the next blog post in the series - an image and multiple image selector.
As for your other question - since the PageSelector is just a FieldControl, like any other field controls it may be included in the definitions of your Edit/View views - the same way as, e.g., TextField - either with the new Fluent definitions API or the classic definitions API. A very good example on the latter may be found in the Products or Locations modules from the SDK.
Hi Lubomir,
It would be still a great addition to have the 'Media' type as a custom field available in the other modules. Is this doable? And... is the long awaited blogpost doing okay?
Thanks,
Daniel
Hi Lubomir,
It would be still a great addition to have the 'Media' type as a custom field available in the other modules. Is this doable? And... is the long awaited blogpost doing okay?
Thanks,
Daniel
Hi Lubomir,
Hi Daniel,
I'm not sure if you've addressed using the Page Selector from the Insert/Edit views or not, but, I have a working implementation of that in one of my custom modules (Sitefinity 5.0.2500). It is only for selecting in-site pages, however. I would love to see a control that supported both internal and external links, but I understand the difficulties around storing the value.
var pageGroupField =
new
PageFieldElement(mainSection.Fields)
ID =
"pageGroupField"
,
DataFieldName =
"PageGroupID"
,
DisplayMode = displayMode,
Title =
"PageGroupFieldTitle"
,
WrapperTag = HtmlTextWriterTag.Li,
ResourceClassId =
typeof
(PartnersResources).Name,
RootNodeID = Telerik.Sitefinity.Abstractions.SiteInitializer.FrontendRootNodeId,
WebServiceUrl =
"~/Sitefinity/Services/Pages/PagesService.svc"
;
mainSection.Fields.Add(pageGroupField);
Hi Travis,
Thanks for your reply.
I was addressing the fact that I'd like to use a:
- PageSelector
- ImageSelector
- MultipleImageSelector
- DocumentSelector
inside of:
- Custom Module
- Custom Widget
- As a Custom Field inside built-in modules
Now for the Custom Widget and Custom Field I'm having it all covered. For the Custom Module I was aware of the code you posted. (but still need a solution for using a document selector)
The point is that this are 3 different approaches for the same thing.
I like the Custom Module approach the best :)
Would be great to see the ability to use the 'Media Selector' that is also built in the Dynamic Modules.
Thanks anyway,
Daniel
hi Travis
I have tried Your code but i never get the Guid of selected page i always get empty Guid in my PageGroupID
property,
any idea on this
Hi Tabish,
Hmm, very strange. As long as your ContentItem has a property called PageGroupID, i think it should work. I have this defined in the following way in my ContentItem:
private
Guid pageGroupID;
[DataMember, FieldAlias(
"pageGroupID"
)]
public
Guid PageGroupID
get
return
this
.pageGroupID;
set
this
.pageGroupID = value;