简体   繁体   English

如何自定义MODX文章生成的存档/标签页?

[英]How To Customize MODX Articles Generated Archives/Tags Pages?

I've installed the MODX Articles plugin to build blog pages. 我已经安装了MODX Articles插件来构建博客页面。 However, I need a way to modify the generated pages for the filters like Author, Tags, and Archives. 但是,我需要一种方法来修改诸如Author,Tags和Archives之类的过滤器的生成页面。

At the moment, the pages generate the same output as the Container template with the RowTpl that matches the criteria. 目前,这些页面生成的输出与Container模板具有与条件匹配的RowTpl相同的输出。

The issue with this is duplicate meta , description , and title tags. 这个问题是重复的metadescriptiontitle标签。 Google Webmaster sees this as an issue. Google网站管理员认为这是一个问题。

A simple solution would be to add a heading placeholder in the template to display the clicked category. 一个简单的解决方案是在模板中添加标题占位符以显示单击的类别。 Where do I need to look to edit this? 我需要在哪里查看此内容?

Create a set of template variables for your SEO meta tags and assign them to your article template. 为您的SEO元标记创建一组模板变量,并将其分配给您的文章模板。 In fact, this is a good way to control all your meta information site wide. 实际上,这是在整个站点范围内控制所有元信息的好方法。

Template Variable Docs. 模板变量文档。

In my 5 years of MODX experience, Articles could be a really pain in the ass, in many ways. 在我5年的MODX经验中,从很多方面来说,Articles可能会让您感到非常痛苦。 I suggest you to make use of normal resources and use the following add-ons so everything 'looks' like Articles: 我建议您利用普通资源并使用以下附加组件,以便一切看起来像“文章”:

  • Grid Class Key to show the resources in the back-end like Articles does (You can show the number of comments and used tags in the list of articles, for example) 网格类键 ,像文章一样在后端显示资源(例如,您可以在文章列表中显示评论数和使用的标签)
  • Archivist , if you want to have year/month/day url's 档案管理员 ,如果您想输入年/月/日的网址
  • SmartTag and Taglister for tagging SmartTagTaglister用于标记
  • Quip , which you already installed. Quip ,您已经安装了。 It plays nice with normal resources and Grid Class Key too. 它也可以与普通资源和Grid Class Key一起使用。

This way you are way more flexible. 这样,您将更加灵活。

Let me know if you need more info or sample code. 让我知道您是否需要更多信息或示例代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM