「Module:Shortcut/doc」:修訂間差異

出自有獸檔案館
(导入1个版本:​[页面文字原许可:CC BY-SA 4.0])
無編輯摘要
標籤2017 原始碼編輯
第1行: 第1行:
{{NoteTA
|G1=MediaWiki
|G2=IT
}}
{{Uses TemplateStyles|Template:Shortcut/styles.css|Template:Mbox/shortcut.css}}
{{Uses TemplateStyles|Template:Shortcut/styles.css|Template:Mbox/shortcut.css}}
本模組用来在页面侧边显示该页面的快捷方式。
本模組用来在页面侧边显示该页面的快捷方式。

於 2023年3月28日 (二) 22:23 的修訂

本模組用來在頁面側邊顯示該頁面的快捷方式。

用法

在維基文本中使用

如果要從wiki標記語法引入,本模板應當從某個模板進行呼叫,通常使用的模板為{{shortcut}}。請參考該模板的文件說明。

用於Lua

如果要從Lua使用本模組,首先請讀取本模板。

local Shortcut = require('Module:Shortcut')

然後您可以依據下列語法建立捷徑方塊:

Shortcut._main(args, frame, type)
  • args 包含了該參數,其中的數組部分是快捷方式的頁面。
  • frame 框架對象。
  • type 顯示的捷徑的類型,可以是"ombox"nil

技術細節

本模組根本沒有Module:Shortcut/config,不需要通過單獨的模塊來配置其內容。