不同域上的扩展菜单

发布于 2024-11-17 22:36:43 字数 349 浏览 5 评论 0原文

我的客户有一个 Drupal 6 站点。

他们现在正在向同一站点添加另一个域,但不同的域将由其公司的另一个分支机构使用。因此,他们需要在菜单中添加一些特定于其他分支机构地理区域的附加内容,以及首页上略有不同的主题。

因此,为了更清楚地说明:domain1.comdomain2.com 都指向一台服务器上完全相同的 Drupal 安装,但并非 100% 共享内容他们之间。

我通常不使用 Drupal,所以我不知道如何解决这个问题。你会如何处理这个问题?有没有办法根据正在使用的域添加或删除单个菜单项?有没有办法在同一场景中使用不同的视图?

贡献模块和编程解决方案都将受到赞赏。

My client has a Drupal 6 site.

They are now adding another domain to the same site, but the different domain is going to be used by another branch of their company. Therefore, they need some additional content, specific to the other branch's geographic area, in the menu, as well as a slightly different theme on the front page.

So, to make it clearer: domain1.com and domain2.com both point to the very same installation of Drupal on one server, but not 100% of the content is shared between them.

I don't usually work with Drupal, so I'm not sure how to tackle this. How would you approach the issue? Is there a way to add or remove a single menu item depending on the domain that is being used? Is there a way to use a different view in the same scenario?

Both contrib modules and programmatic solutions will be appreciated.

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

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

发布评论

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

评论(2

我一向站在原地 2024-11-24 22:36:43

域访问模块允许您拥有多个具有同一数据库的域。您可以在每个站点的界面中设置不同的主题。这是一个不错的选择,特别是如果您的网站共享某些内容,而其他内容仅出现在其中一个网站上。安装后,您将在节点编辑屏幕上看到一个选项,用于选择内容应出现在哪些站点中。对于内容编辑者来说非常容易。

域访问擅长管理具有附属内容的两个不同域(这就是设计的目的),它确实需要比大多数模块更多的配置,并且您需要控制站点的 DNS。

另一个不错的选择可能是使用有机组。我在一个与您描述的网站非常相似的网站上使用它。与域访问一样,您可以与多个组共享同一段内容。只是域访问模块可能更加精简,因为它旨在执行您所描述的操作,而 OG 可能需要稍微更多的调整。

The Domain Access module allows you to have more than one domain with the same database. You can set different themes in the interface per site. This is a good option especially if you have sites where some of the content is shared, while other content only appears on one of the sites. Once it's installed, you'll see an option on the node edit screen to select which sites the content should appear in. Very easy for content editors.

Domain Access is good at managing two different domains with affiliate content (as that's what is designed to do), it does require more configuration that most modules and you need to have control over your site's DNS.

Another good option might be to use Organic Groups. I use this on a site much like the one you're describing. Like Domain Access, you can share the same piece of content with multiple groups. It's just that the Domain Access module is probably a little more streamlined as it's designed to do what you're describing, while OG may require slightly more tweaking.

心奴独伤 2024-11-24 22:36:43

该用例适合使用共享表的 Drupal 多站点配置 (http://drupal.org/node/43816)。本质上,一个站点位于 /sites/site1 中,另一个站点位于 /sites/site2 中,每个 settings.php 文件将表指向共享数据库表。

This use case would suit using a Drupal multisite configuration (http://drupal.org/node/43816) using shared tables. In essence, one site would live in /sites/site1, the other in /sites/site2, with each settings.php file pointing the tables to a shared database table.

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