teppokoivula/page-render-find-replace

页面渲染查找/替换是 ProcessWire CMS/CMF 模块,它将通过 TextformatterFindReplace 指定的替换应用于渲染后的页面内容。

0.0.3 2022-07-10 12:34 UTC

This package is auto-updated.

Last update: 2024-09-10 16:56:49 UTC


README

此模块将 TextformatterFindReplace 指定的替换应用于渲染后的页面内容。这在页面内容由多个字段或动态生成的情况下可能更方便,或者在不方便(甚至不可能)逐字段使用文本格式化模块的情况下。

由于所有繁重的工作都由 TextformatterFindReplace(Ryan Cramer 的模块)完成,因此页面渲染查找/替换需要安装该模块。

有关更多详细信息,请参阅 https://github.com/ryancramerdesign/TextformatterFindReplace

使用方法

  1. 安装 TextformatterFindReplace 和 PageRenderFindReplace
  2. 通过 TextformatterFindReplace 配置页面进行替换配置
  3. 通过 PageRenderFindReplace 配置页面进行适用页面配置
  4. 可选:通过 PageRenderFindReplace 配置页面启用日志记录

日志记录的目的是捕获任何残留的旧字符串(迁移期间的 URL/域名等),以便可以在页面内容中(手动)替换它们。使用此模块会增加一些开销并更改页面标记,因此您不应永久启用它。

安装

您可以通过将 PageRenderFindReplace 目录下载或克隆到您网站的 /site/modules/ 目录中来安装此模块。或者,您可以使用 Composer 安装模块:composer require teppokoivula/page-render-find-replace

许可证

本项目采用 Mozilla 公共许可证第 2.0 版。