Difference between revisions of "Templates as macros"

From Bisq Wiki
Jump to navigation Jump to search
Line 3: Line 3:
 
To create a template page, you can do so like any other wiki page, but you need to add the prefix "Template:" at the beginning. It's recommended that template pages used as macros have a more simplified name for ease of recall. The newly created template page should only contain the content that will be displayed inline when referenced.
 
To create a template page, you can do so like any other wiki page, but you need to add the prefix "Template:" at the beginning. It's recommended that template pages used as macros have a more simplified name for ease of recall. The newly created template page should only contain the content that will be displayed inline when referenced.
  
To display the content of a template page inline, use the following command: "{{name_of_template}}". For instance, to display the content of the template page "Template:MaxTradeSizeUnsigned", you would use "{{MaxTradeSizeUnsigned}}".
+
To display the content of a template page inline, use the following command: "<nowiki>{{name_of_template}}</nowiki>". For instance, to display the content of the template page "<nowiki>Template:MaxTradeSizeUnsigned</nowiki>", you would use "<nowiki>{{MaxTradeSizeUnsigned}}</nowiki>".
  
 
List of current Templates being used as macros, for reference and quick access:
 
List of current Templates being used as macros, for reference and quick access:

Revision as of 22:22, 30 January 2025

MediaWiki, the software platform that powers the Bisq Wiki, includes a built-in feature that allows the content of a template page to be displayed inline on any other page using a markup command. This can be very useful, for example, when mentioning a maximum trade amount that might change over time on multiple pages. You won't have to worry about those pages becoming outdated if the amount changes.

To create a template page, you can do so like any other wiki page, but you need to add the prefix "Template:" at the beginning. It's recommended that template pages used as macros have a more simplified name for ease of recall. The newly created template page should only contain the content that will be displayed inline when referenced.

To display the content of a template page inline, use the following command: "{{name_of_template}}". For instance, to display the content of the template page "Template:MaxTradeSizeUnsigned", you would use "{{MaxTradeSizeUnsigned}}".

List of current Templates being used as macros, for reference and quick access:

Template:MaxTradeSizeUnsigned - Displays the max trade amount for an unsigned buyer.
MaxTradeSizeBisq1 - Displays the max trade size for Bisq 1 trade (keeping separate for more flexibility with Bisq 2 protocols)
MaxBisqEasyTrade - Displays the max trade amount for a Bisq Easy trade