github.com/rabbouni145/gg@v0.47.1/docs/content/en/variables/shortcodes.md (about)

     1  ---
     2  title: Shortcode Variables
     3  linktitle: Shortcode Variables
     4  description: Shortcodes can access page variables and also have their own specific built-in variables.
     5  date: 2017-03-12
     6  publishdate: 2017-03-12
     7  lastmod: 2017-03-12
     8  categories: [variables and params]
     9  keywords: [shortcodes]
    10  draft: false
    11  menu:
    12    docs:
    13      parent: "variables"
    14      weight: 20
    15  weight: 20
    16  sections_weight: 20
    17  aliases: []
    18  toc: false
    19  ---
    20  
    21  [Shortcodes][shortcodes] have access to parameters delimited in the shortcode declaration via [`.Get`][getfunction], page- and site-level variables, and also the following shortcode-specific fields:
    22  
    23  .Ordinal
    24  : Zero-based ordinal in relation to its parent. If the parent is the page itself, this ordinal will represent the position of this shortcode in the page content.
    25  
    26  .Parent
    27  : provides access to the parent shortcode context in nested shortcodes. This can be very useful for inheritance of common shortcode parameters from the root.
    28  
    29  .IsNamedParams
    30  : boolean that returns `true` when the shortcode in question uses [named rather than positional parameters][shortcodes]
    31  
    32  .Inner
    33  : represents the content between the opening and closing shortcode tags when a [closing shortcode][markdownshortcode] is used
    34  
    35  [getfunction]: /functions/get/
    36  [markdownshortcode]: /content-management/shortcodes/#shortcodes-with-markdown
    37  [shortcodes]: /templates/shortcode-templates/
    38  
    39