Use inline plugin to display a value from URL query parameter. This can be useful for onboarding pages or runbooks where commands or settings change based on user or some runtime information, and you can generate a link, providing additional information. url-query-value
Renders as: The is the query parameter name to read from the URL. Click SF office to see the value above change. `:url-query-value: officeName {default: "NYC-15"}` officeName
When no is specified and the query parameter is not present, an error is displayed: Renders as: default `:url-query-value: clusterName`
Template Syntax In Code Snippets And CLI Commands
Use or syntax inside code snippets to substitute values from URL query parameters. Enable it by setting on the code block. Without query parameters, default values are used. When the page URL contains , the substituted values will appear. Without default values, you get error message when no query parameter is supplied: ${paramName} ${paramName:defaultValue} templateUseQueryParam: true ```shell {templateUseQueryParam: true} ssh ${userName:admin}@server-${officeName:NYC}.example.com ``` ssh ${userName:admin}@server-${officeName:NYC}.example.com ```cli {templateUseQueryParam: true} kubectl config use-context ${officeName:NYC}-cluster ``` kubectl config use-context ${officeName:NYC}-cluster ?userName=jdoe&officeName=SF ```cli {templateUseQueryParam: true} kubectl config use-context ${myQueryParam}-cluster ``` kubectl config use-context ${myQueryParam}-cluster
Tables With Inline Values
You can use inline anywhere were text is expected, for example in table cells: Setting Value [{text=Office, type=SimpleText}] [{default=NYC, queryParam=officeName, type=UrlQueryValue}] [{text=Floor, type=SimpleText}] [{default=5, queryParam=floorNumber, type=UrlQueryValue}] [{text=Wi-Fi Network, type=SimpleText}] [{default=NYC, queryParam=officeName, type=UrlQueryValue}, {text=-internal, type=SimpleText}] [{text=VPN Server, type=SimpleText}] [{text=vpn-, type=SimpleText}, {default=NYC, queryParam=officeName, type=UrlQueryValue}, {text=.example.com, type=SimpleText}] url-query-value | Setting | Value | |---------------|-----------------------------------------------------------------| | Office | `:url-query-value: officeName {default: "NYC"}` | | Floor | `:url-query-value: floorNumber {default: "5"}` | | Wi-Fi Network | `:url-query-value: officeName {default: "NYC"}`-internal | | VPN Server | vpn-`:url-query-value: officeName {default: "NYC"}`.example.com |
Click one of the links below to see how values on this page change: SF office, floor 3 NYC office, floor 12 London office, floor 7 Default values Setup Instructions Welcome to the office! Connect to the office VPN: Configure your local environment: Print a test page: Note: If you have a predetermined set of values, consider using Page Tabs or Tabs instead sudo vpn connect ${officeName:NYC}-gateway.example.com --user ${userName:admin} export OFFICE=${officeName:NYC} export FLOOR=${floorNumber:5} export PRINTER=printer-${officeName:NYC}-${floorNumber:5} lp -d printer-${officeName:NYC}-${floorNumber:5} /etc/motd