Page reference property control in GuiPlugin?

Vote:
 

Hello,

We have created a GuiPlugin which appears in edit mode and this works just fine. Now I'd like to add a ProperyPageReferenceControl (I think that's the name of it, the same control that appear in edit mode for properties of the typ Page) in this plugin but haven't been able to figure out how to do this? Does anyone know if this is possible and if so, how to do this?

Best regards

Martin

 

#33293
Oct 07, 2009 10:47
Vote:
 

Hi Martin.

I think this should do the trick:

 

[PlugInProperty(Description = "Description", AdminControl = typeof(InputPageReference), AdminControlValue = "PageLink")] public PageReference YourPageReference { get; set; }
Hope this helps!
Br, Tore 

 

 

#33294
Oct 07, 2009 11:25
Vote:
 

Hello Tore,

Thanks for your answer but I'm not really following how and where to use this? Perhaps my question isn't clear enough or I just don't understand the PlugInProperty things. 

What I've created is a plugin that appears as a tab next to the View, Edit, Version List and other tabs connected to each page in edit-mode (PlugInArea.EditPanel). Here I've created a place where our editors can administrate companies and users that are connected to our site. This is being done using a number of normal ASP.NET controls, lists, textboxes etc. 

Here I'd also like to add a couple of pagereference controls where the editor can pick a page on the site and save this page's id as a setting on for instance a company that we have in this plugin. 

I know it's possible to add a control like this when creating dynamic content "plugins" using PropertyPageReference, but how can I add this on a EditPanel plugin ascx?

Hope this makes sense :-)

Best regards

Martin

#33392
Oct 10, 2009 14:21
Vote:
 

Hi Martin.

My bad, I misunderstood you. If I understand you right, you want to use a PageReference property in your GuiPlugin page? Then you can use the  InputPageReference WebControl in the EPiServer.Web.WebControls namespace in the EPiServer dll. You just have to import the namespace in your aspx/ascx file like this: <%@ Register TagPrefix="ux" Namespace="EPiServer.Web.WebControls" Assembly="EPiServer" %>

and call the control like this: <ux:InputPageReference runat="server" id="YourPageRef" />

Hope this helps!

Br, Tore

#33397
Oct 11, 2009 17:01
Vote:
 

Hi Tore,

That's exactly what I was looking for, thanks a lot!!

/Martin

#33398
Oct 11, 2009 19:32
Vote:
 

Hi,

Would you guys know how to achieve the user control for InputPageReference in MVC/razor?

Thanks,

Nicola

#176611
Mar 23, 2017 0:53