• 首页
  • 随机
  • 登录
  • 设置
  • 关于中医百科
  • 免责声明
中医百科

模板: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号
  • 桌面版