创建可重用内容类型的最佳方法?

发布于 2024-12-21 13:38:12 字数 391 浏览 0 评论 0原文

假设您有一个内容类型,在您的公司创建了 5、6 个网站之后,您仍然使用它,而没有更改它。

我开始认为将此内容类型复制到您创建的每个网站并不是“最佳”解决方案......但同时,我认为仅为一种内容类型创建一个完整的包(鸡蛋)是矫枉过正。 (它将包含工作流程、内容类型定义和自定义视图)。通过这种方法,这意味着 Plone 站点将需要安装很多软件包(我认为太多的依赖项是不好的)。

我的问题是:对于为很多公司创建很多网站的人(女孩)来说,你会看到很多内容类型的模式。您是否只为一种内容类型创建一个包,或者为一个包含您最常使用的一堆内容类型的产品?

(我正在考虑创建 company.archetypes.mycustomtypethatiusealot)

Suppose you have a content-type that, after 5, 6 websites you do on your company, you still use it, without changing it.

I'm starting to think that copying this content-type to every website you create is not the "optimal" solution... but at the same time, I think creating a full blown package (egg) for only one content-type is overkill. (It would contain a workflow, a content-type definition and a custom view). And by this approach, it means a Plone site would have a lot of packages to install (too many dependencies is bad, I think).

My question is: for you guys (girls) that create a lot of websites to a lot of companies, you see a pattern for a lot of content-types. Do you create a package for only one content-type, or a single product with a bunch of them you use the most?

(I was thinking about creating company.archetypes.mycustomtypethatiusealot)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

墨小墨 2024-12-28 13:38:12

我为我需要的任何内容创建一个包。如果第二个站点仅使用其中部分内容,我将重构为单独的包。如果您制作一个包含所有依赖项的超级包,那么您不需要安装许多单独的包。

例如,对于一位客户,我有三个站点。两个人共享一个主题——那就是一个包。第三个有主题、几个内容类型(它们是另一个包)和一个安全包。内容类型包取决于主题和安全包,安全包取决于两个或三个第三方包。我只需安装内容类型包,其他所有内容都会自动引入。

不打包你的内容类型似乎是 20 世纪的风格,而且工作量也很大。

I create a package for any content I need. If a second site uses only some of that content, I'll refactor into separate packages. If you make a superpackage that includes all the dependencies then you don't need to install many separate packages.

So, for instance, for one customer I have three sites. Two share a theme - that's a package. The third has the theme, a couple of content types (they're another package), and a security package. The content-type package depends on the theme and security packages, and the security package depends on two or three 3rd-party packages. I simply install the content-type package and everything else gets pulled in automatically.

Not packaging your content types seems so 20th century, and also so much work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文