Page Selector in custom field

Posted by Community Admin on 04-Aug-2018 08:49

Page Selector in custom field

All Replies

Posted by Community Admin on 10-Jun-2011 00:00

Hi !
Can anybody tell me how to use page selector as a custom field.?
Thanks in advance..

Posted by Community Admin on 10-Jun-2011 00:00

Hello waqar,

I believe you might find this post from our forums useful for implementing the page selector in your control. Please let us know if you have any additional questions.

Kind regards,
Boyan Barnev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 13-Jun-2011 00:00

Thanks for the reply.!
But please tell me that how can I add page selector as a custom field in lists module ?
Please help me and instruct me for achieving this functionality.

Thanks! 

Posted by Community Admin on 13-Jun-2011 00:00

Hi waqar,

Can you, please, take a look at this KB article where we're explaining how to achieve similar functionality in another content module, and let me know if you need any further information in order to achieve the desired functionality. I'll be glad to help.

Regards,
Boyan Barnev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 14-Jun-2011 00:00

Thanks!
I already have this link and I have used this. But I want some easy way to achieve this functionality.
Why is it very difficult to develop such a common control in sitefinity? while every CMS has this functionality and its easy.

Posted by Community Admin on 09-Apr-2014 00:00

It's a quite old post but no proper answer. Is there some easy or say better way for page selection in sitefinity 6+ ?

Posted by Community Admin on 11-Apr-2014 00:00

Hi Kamran,

I have prepared and attached a sample for a page selector as a field control. It resolves and shows the selected Page Url depending on the current UI culture in the front-end. In the back-end edit mode the page url is shown in a textbox under the selector for the default back-end culture. However, the presentation and beahvior could be changed to suit your needs. For functionality and usage refer to this video.
I hope you find this helpful.

Regards,
Nikola Zagorchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 15-Apr-2014 00:00

Thanks Nikola Zagorchev

Can you please let me know how to add the files and at which particular location?

Also in the JS file i see a hardcoded link to the page service as localhost:60876/.../ is it fine to use it?

Posted by Community Admin on 16-Apr-2014 00:00

Hello kami47,

I attach an updated version of the Page Selector here. The same is also available in this forum thread.

You can use the Page Selector custom field control by creating a new field in for an item and choosing Short Text as Type and for Interface widget for entering data choose Custom. In Type or Virtual path of the custom widget enter the path or the type of the filed control. For instance, if it is in your SitefinityWebApp project, in folder FieldControls, with name PageSelectorFieldControl, you should enter the following:
SitefinityWebApp.FieldControls.PageSelectorFieldControl . Then, in the item template where you will evaluate this field and show it in the front-end, you should customize the template and for this field to add the following:

<%@ Register Assembly="SitefinityWebApp" Namespace="SitefinityWebApp.FieldControls" TagPrefix="custom" %>
  
<custom:PageSelectorFieldControl runat="server" Value='<%# Eval("myProperty")%>' DisplayMode="Read" ID="customPageSelector" />

It is important that you specify the DisplayMode of the widget to the Read, so the conditional template for the field control will evaluate the ReadMode statement and will be displayed as a HyperLink:

( Code from the field control template )

<sf:ConditionalTemplate ID="ConditionalTemplate1" Left="DisplayMode" Operator="Equal" Right="Read" runat="server">      
            <asp:HyperLink ID="HyperLink1" runat="server">Url</asp:HyperLink>
        </sf:ConditionalTemplate>

Considering the serviceUrl, you should change the origin of the service to match yours. Example:
www.mysite.com/.../
You could refactor this if you want. This is all you should consider when adding the field control to your project and custom field.

Regards,
Nikola Zagorchev
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 16-Apr-2014 00:00

Thanks Nikola but i have already able to resolve my problem via help of same person [waqar] who has posted this query

Posted by Community Admin on 17-Apr-2014 00:00

Hi,

I am glad that you have successfully configured the page selector.

Regards,
Nikola Zagorchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 17-Apr-2014 00:00

Thanks Nikola

Posted by Community Admin on 18-Apr-2014 00:00

Hi,

Feel free to contact us if you need additional assistance.

Regards,
Nikola Zagorchev
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed