Adding Page Links

A link can add a transition point to a reference such as another DiveTab page, DivePort page, web page, document, or map.

Links can also be added to charts and column sets. This procedure describes how to add a page link.

Here is an Closedexample of an overview page with a grid including some basic information.

Grid Dimcounts before Links are added.

Here is the Closedcode for the overview page.

divetab version = "0.0" { 
  
  definitions { 
    elements { 
      grid id = "grid_labels" { 
        row 
        row "Posting Period" 
        row 
        row "Corporate Product Group" 
        row "Corporate Product Sub Group" 
        row "Corporate Brand" 
        row 
        row "Resp Team" 
        row "Resp SalesPerson" 
      } 
      
      grid id = "grid_columns" { 
        row 
        row { 
          text column = "Posting Period Count" { 
            justification "left"
        } 
        row 
        row { 
          text column = "Corporate Product Group Count" { 
            justification "left" 
          } 
        } 
        row { 
          text column = "Corporate Product Sub Group Count" { 
            justification "left" 
          } 
        } 
        row { 
          text column = "Corporate Brand Count" { 
            justification "left" 
          } 
        } 
        row 
        row { 
          text column = "Resp Team Count" { 
            justification "left" 
          } 
        } 
        row { 
          text column = "Resp SalesPerson Count" { 
            justification "left" 
          } 
        } 
      } 
    } 
  } 
  
  data-area id = "overview-page" { 
    title "Adding Page Links" 
    icon "/divetab/images/trends-322-178.png"
    sections { 
      overview-page { 
        title "Overview Page" 
        cplan "/cplans/basic_101.cplan" 
        
        tab "Cost" { 
          screen { 
            layout { 
              vsplit { 
                
                hsplit percent = 40 { 
                  spacer percent = 3 
                  element id = "grid_labels" percent = 20 
                  line percent = 2 
                  element id = "grid_columns" percent = 10 
                  line percent = 2 
                  spacer percent = 63
                } 
              } 
            } 
          } 
        }
      } 
    } 
  } 
} 

This procedure details steps to change a column to include a link to an additional internal data page.

  1. Open the appropriate divetab script.
  2. Locate where the column is specified. For example, Corporate Product Group Count.
  3. Add a link tag and specify a page. For example:

      text column = "Corporate Product Group Count" { 
        justification "left" 
        link { 
          page id = "ad-hoc" 
        } 
      } 
    
  4. After the end of the sections block, add a pages tag.

      pages { 
  5. Add an ad-hoc-page for the link created in Step 3.

      pages { 
        ad-hoc-page id = "ad-hoc" { 
          title "Ad Hoc Sales" 
          cplan "/cplans/basic_101.cplan" 
          
          dimension "Corporate Product Group" 
          dimcount-dimension "Corporate Brand" 
          available-dimension "Resp Team" 
          available-dimension "Resp SalesPerson" 
          quickview-dimension "Posting Period" 
          
          text column = "Cost" { 
            value-format "$#,###.00" 
          } 
          text column = "Net Sales" { 
            value-format "$#,###.00" 
          } 
        } 
      } 
  6. Save the script and Sync in DiveTab.

Here is the Closedresult of the code in DiveTab.

Grid Dimcounts with Links now added; row now shaded to indicate link

Here is the Closedlinked ad hoc page.

Linked Ad Hoc page.

Things to note about this script sample:

  • Pages defined in a pages block are only accessible through the click action generated by the defined link.
  • These links appear to the DiveTab user as shaded cells.
  • Such pages and links can simulate simple diving into the details, or provide access to related but different data sets.
  • If the target page has a corresponding parameter, the selected value on the initial page is passed to the target page.

See also: