Documentation > Services API > ServicesOutput > BuildHyperLinkList(List[PanelEntry],String,LinkListType,String,String,String,LinkListType,Int32)


Called by RenderHyperLinkList to generate a HTML list of links (and/or sub-links)

public System.String BuildHyperLinkList(List[PanelEntry],String,LinkListType,String,String,String,LinkListType,Int32)


HTML list (or nested list) of links.


panels PanelEntry that contains the List Panel with the fields from ServicesInput.ShowHyperLink. List<PanelEntry>
fieldName Name given to the List Panel and ServicesInput.ShowHyperLink. System.String
listType Optional: Enumerated type LinkListType for parent list. CrownPeak.CMSAPI.Services.ServicesOutput+LinkListType
listParentClass Optional: Class of parent list System.String
listParentId Optional: ID of parent list System.String
childField Optional: Name of the child List Panel and ServicesInput.ShowHyperLink. System.String
childListType Optional: Enumerated type LinkListType for child list. CrownPeak.CMSAPI.Services.ServicesOutput+LinkListType
activeId Optional: Indicates the link of the current page, assuming the current page displays the list. System.Int32

Code Example



            List<PanelEntry> panels = asset.GetPanels("menu");
            Out.WriteLine( ServicesOutput.BuildHyperLinkList(panels, "menu", childField: "submenu"));
            /*returns and outputs:
              <li><a href="" target="_self">Link 1 google</a>\r\n
                  <li><a href="" target="_self">sublink 1 maps</a></li>\r\n
                  <li><a href="" target="_self">sublink 2 mail</a></li>\r\n
              <li><a href="" target="_self">Link 2 yahoo</a>\r\n
                  <li><a href="" target="_self">sublink 1 mail</a></li>\r\n

Connect with Crownpeak