All project content is available for reading, but you need to be a member of the project for Subversion checkout of source code, or to create/modify any information.
Login if you are a member. Apply here to request membership (open to all).

Ticket #25 (closed enhancement: fixed)

Opened 12 years ago

Last modified 11 years ago

Update MultiPageProperty to display list of links by default

Reported by: jerms55@… Owned by: jerms55@…
Priority: minor Component: MultiPageProperty
Keywords: Cc:


At the moment the MultiPageProperty displays an Unordered HTML list when displayed on a page using the EPiServer:Property control.

It would be good to update it to render a list of Hyperlinks instead.

At the moment there are a couple of classes that handle the creation of the HTML. These could be updated to inherit from WebControl. This would then allow us to use Hyperlink controls in the list. The idea would be to create a control similar to the .Net ListBox where you have a list control and items.

Change History

comment:1 Changed 12 years ago by steve@…

I've looked at the possibility of creating a list type webcontrol for doing this, and I've come to the conclusion that it might not be worth the effort. Sure, using a web control would make for nice code, but that is about it. Unless you're parsing the control tree upon rendering, which is not very common, using a custom webcontrol for this would just add complexity.

Unless we could tell the method what control to use for rendering, then we could inherit our custom lists off a generic list control.

But that is a lot more work than just databind the SelectedPages to a PageList, and have it render whatever list we can dream of. :-)

I propose we do two things:

  1. Make the PropertyMultiPage.cs CreateChildControls method render a list that works with the sliding doors technique.
  2. Create a new list control that inherits from PageList which accepts the name of the property that holds a MultiPageProperty, and gets the pages directly from SelectedPages upon databinding.

Here is some example markup that works with the sliding doors technique:

<div id="tabsF">
        <li><a href="/news/"><span>Siste nytt</span></a></li>
        <li id="current"><a href="/about/"><span>About</span></a></li>
        <li><a href="/events/"><span>Events</span></a></li>

The class name above should be the CssClass property provided by the episerver property control. This markup works directly with the styles created by the CSS Tab Designer, downloadable from http://www.highdots.com/css-list/ (free).

comment:2 Changed 11 years ago by steve@…

  • Status changed from new to closed
  • Resolution set to fixed

We've got two web controls to help people do this in the WebControls folder.

Closing this ticket.

Note: See HelpUser/Tickets for help on using tickets.