Shortcode methods
Use these methods in your shortcode templates.
Use these methods in your shortcode templates.
SHORTCODE.Get ARG ⟼ anyReturns the value of the given argument. Read More »
SHORTCODE.Inner ⟼ template.HTMLReturns the content between opening and closing shortcode tags, applicable when the shortcode call includes a closing tag. Read More »
SHORTCODE.InnerDeindent ⟼ template.HTMLReturns the content between opening and closing shortcode tags, with indentation removed, applicable when the shortcode call includes a closing tag. Read More »
SHORTCODE.IsNamedParams ⟼ boolReports whether the shortcode call uses named arguments. Read More »
SHORTCODE.Name ⟼ stringReturns the shortcode file name, excluding the file extension. Read More »
SHORTCODE.Ordinal ⟼ intReturns the zero-based ordinal of the shortcode in relation to its parent. Read More »
SHORTCODE.Page ⟼ hugolib.pageForShortcodeReturns the Page object from which the shortcode was called. Read More »
SHORTCODE.Params ⟼ anyReturns a collection of the shortcode arguments. Read More »
SHORTCODE.Parent ⟼ hugolib.ShortcodeWithPageReturns the parent shortcode context in nested shortcodes. Read More »
SHORTCODE.Position ⟼ text.PositionReturns the filename and position from which the shortcode was called. Read More »
SHORTCODE.Ref OPTIONS ⟼ stringReturns the absolute URL of the page with the given path, language, and output format. Read More »
SHORTCODE.RelRef OPTIONS ⟼ stringReturns the relative URL of the page with the given path, language, and output format. Read More »
SHORTCODE.Scratch ⟼ maps.ScratchReturns a “scratch pad” scoped to the shortcode to store and manipulate data. Read More »
SHORTCODE.Site ⟼ page.siteWrapperReturns the Site object. Read More »
SHORTCODE.Store ⟼ maps.StoreReturns a “Store pad” scoped to the shortcode to store and manipulate data. Read More »