• 首頁
  • 隨機
  • 登入
  • 設定
  • 關於中医百科
  • 免責聲明
中医百科

模板:Excerpt

  • 語言
  • 監視
  • 檢視原始碼
模板文檔[查看] [編輯] [查看歷史] [清除緩存]
此模板基於以下Lua語言模塊編寫:
  • Module:Excerpt

此模板用於在其他頁面中重複使用(嵌入)另一個頁面的部分內容。這樣做有以下優點:

  • 通過避免重複維護來減少維護工作。
  • 通過鼓勵合併相關內容來提高內容質量。
  • 通過引導貢獻者集中編輯來促進合作。

目次

  • 1 用法
    • 1.1 基本用法
    • 1.2 主要參數
  • 2 示例
  • 3 參見

用法

基本用法

  • {{Excerpt|页面名}} — 嵌入該頁面的導言部分。
  • {{Excerpt|页面名|章节名}} — 嵌入指定章節(不含子章節)。

主要參數

  • 1 或 article 或 page — 必填。要嵌入的頁面名稱,默認嵌入導言。
  • 2 或 section 或 fragment — 要嵌入的章節名或 <section> 標籤名。
  • only — 僅嵌入指定元素:file/files、list/lists、table/tables、template/templates、paragraph/paragraphs。
  • paragraphs — 指定嵌入哪些段落(如 1、1-3、-1 等,負數表示排除)。
  • files / tables / lists / templates — 控制嵌入的對應元素(逗號分隔、負號排除、支持正則)。
  • hat=no — 隱藏"此段落摘自XX"的頂注。
  • bold=yes — 保留粗體文字。
  • links=no — 移除所有維基鏈接。
  • quote=yes — 用 <blockquote> 包裹嵌入內容。
  • inline=yes — 移除周圍注釋和 div 標籤,便於嵌入其他文字。
  • references=no — 移除所有參考文獻。
  • subsections=yes — 包含子章節。
  • noerror=yes — 隱藏錯誤消息。

示例

{{Excerpt|甘草}}

嵌入"甘草"頁面的導言部分,並顯示"此段落摘自甘草"頂注。

{{Excerpt|甘草|性味}}

嵌入"甘草"頁面的"性味"章節。

參見

  • Template:Transcluded section — 僅添加頂注而不嵌入內容
  • 閱
  • 論
  • 編
頂注模板
主條目
  • {{Main}}
  • {{Category main}}(頁面分類)
  • {{Broader}}
通用
  • {{Hatnote}}
其他用法
  • {{About}}
  • {{Other uses}}
  • {{About list}}
關於……
  • {{For}}
  • {{For2}}(自定義文字)
更多信息
  • {{Further}}
  • {{Further2}}(自定義文字)
參見
  • {{See also}}
  • {{Category see also}}
  • {{Category see also if exists}}
地點人物
  • {{Other people}}
  • {{Othernames}}
  • {{Other places}}
重定向
  • {{Redirect}}
  • {{Redirect-multi}}
  • {{Redirect-synonym}}
  • {{Redirect list}}
  • {{technical reasons}}
消歧義
  • {{Distinguish}}
  • {{Distinguish2}}
  • {{About-distinguish}}
  • {{About-distinguish-text}}(自定義文字)
  • {{Redirect-distinguish}}
嵌入
  • {{Transcluded section}}
  • {{Section transclude}}
頂注分類
  • 頂注模板
  • 頂注模塊
  • 列表頂注模板
上述文檔嵌入自Template:Excerpt/doc。(編輯 | 查看歷史)
編者可以在本模板的沙盒(創建 | 鏡像)和測試樣例(創建)頁面進行實驗。
請將分類添加至/doc子頁面。本模板的子頁面。
取自「https://zybkcn.com/w/index.php?title=Template:Excerpt&oldid=54881」
最後編輯於 2026年8月1日 (星期六) 14:46

語言

  • 不转换
  • 简体
  • 繁體
中医百科
  • 此頁面最後編輯於2026年8月1日 (星期六) 14:46。
  • 隱私權政策
  • 關於中医百科
  • 免責聲明
  • 陕ICP备2021000932号-1
  • 陕公网安备61019002001593号
  • 桌面版