【问题标题】:Modify all frontend content修改所有前端内容
【发布时间】:2018-10-08 18:22:05
【问题描述】:

我想在呈现之前修改所有前端内容。

例如:将“foo”等所有字符串替换为“bar”。

所以现在我得到了这个:

public function boot()
{
    /*
     * Set the page context for translation caching with high priority.
     */
    Event::listen('cms.page.init', function($controller, $page) {
        dump($page);
    }, 100);
 }

这向我显示了 $page 的转储 - 但我该如何修改内容?

【问题讨论】:

    标签: octobercms octobercms-plugins


    【解决方案1】:

    看看cms.page.postprocess事件中的第三个参数content

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-06-17
      • 2013-09-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多