scaBreadCrumb

Control Description

scaBreadCrumb User Control gives you the possibility to add a stylish breadcrumb navigational menu to keep track of the visited pages

Compatibility 

Web

Using the control

Drag and drop scaBreadCrumb to the web form of the object where you want to show the menu. Usually a web component specially created to show this menu. 

Note: If you user Work With Pattern, then you can use this user control in RecentLinks web component. 

The above result is produced by the following code:

Event Start
    &LinkList = new()
    &LinkListItem = new()
    &LinkListItem.Caption = "Sample page 1"
    &LinkListItem.URL = Home.Link()
    &LinkList.Add(&LinkListItem)
    
    &LinkListItem = new()
    &LinkListItem.Caption = "Sample page 2"
    &LinkListItem.URL = Home.Link()
    &LinkList.Add(&LinkListItem)
    
    &LinkListItem = new()
    &LinkListItem.Caption = "Sample page 3"
    &LinkListItem.URL = Home.Link()
    &LinkList.Add(&LinkListItem)
    

    scaBreadCrumb1.HomeURL = Home.Link() //this URL will be called when the user clicks on the home image.
EndEvent

Then just assign &LinkList variable to the Data property of the User Control. Now just drag and drop the control from the toolbox to your Master Page

As we mentioned before, if you want to replace the defalut menu generated by Work With Pattern in RecentLinksWC, you can just delete the content of the web form, drag and drop the user control and then just set &RecentLinksItems to its Data property. The Events part of the object should be modified to use the user control instead of the default free style grid.
 

Event Start
    // Load current links.
    &RecentLinksItems.FromXml(&Session.Get(!"RecentLinks"))

    // Delete current from list, if present.
    &i = 1
    Do While &i <= &RecentLinksItems.Count
        &RecentLinksItem = &RecentLinksItems.Item(&i)
        If Trim(&RecentLinksItem.Caption) = Trim(&FormCaption)
            &RecentLinksItems.Remove(&i)
        Else
            &i += 1
        EndIf
    EndDo

    // Shorten list if necessary, so that at most RecentLinksOptions.Size items are left at the end.
    Do While &RecentLinksItems.Count > RecentLinksOptions.Size - 1
        &RecentLinksItems.Remove(1)
    EndDo

    // Add new link and store.
    &RecentLinksItem = new()
    &RecentLinksItem.Caption = Trim(&FormCaption)
    &RecentLinksItem.URL = &Request.ScriptName + !"?" + &Request.QueryString 
    &RecentLinksItems.Add(&RecentLinksItem)

    &Session.Set(!"RecentLinks", &RecentLinksItems.ToXml())

    // Display links.
    /*
    For &i = 1 To &RecentLinksItems.Count
        &RecentLinksItem = &RecentLinksItems.Item(&i)
        Place.Caption = &RecentLinksItem.Caption
        If (&i < &RecentLinksItems.Count)
            Place.Link = Link(&RecentLinksItem.URL)
        Else
            Place.Link = ""
        EndIf

        Load
    EndFor
    */

   scaBreadCrumb1.HomeURL = Home.Link() // this URL will be called when the user clicks on the home image.
EndEvent
 

Change Log May 18th, 2011: Added support for new properties TooltipText (if not set, Caption property is shown as tooltip) and LinkTarget (default _self) so you can now use them as follows. Note: LinkList SDT is not distributed by the User Control so if you want to use the new properties you need to edit the SDT in order to add the new fields (TooltipText Character and LinkTarget Character).

    &LinkList = new()
    &LinkListItem = new()
    &LinkListItem.Caption = "Sample page 1"
    &LinkListItem.URL = Home.Link()
    &LinkListItem.TooltipText = "Sample page 1"
    &LinkListItem.LinkTarget = "_blank"
    &LinkList.Add(&LinkListItem)

Excecution