dongshi1188 2013-10-16 18:54
浏览 33
已采纳

在Drupal Cache之外创建动态菜单链接

For our Drupal 7 Commerce site we are trying to create a "portal system". I have it set up with all of the content at this point with all of the content referencing the same taxonomy to filter the respective products and content into either "portal one", "portal two", or both in the same. I have also already set up all the views and content types to display the content appropriately. Everything is 100% but now I need to use either session data or cookies to let the user (anonymous and authenticated) to choose from a pop up with "portal one" and "portal two" (this is already created as well) and change the urls on the main menu accordingly.

Currently the site is set up to have testsite.com/portal1/products as the url for portal 1 products and test site.com/portal2/products as the url for portal 2. The urls are set up exactly the same as this for all of the other content and views.

I also realize that this will get somewhat complex when dealing with users entering the site to internal links. A logic diagram has already been laid out, but that is a point of concern as well.

  • 写回答

1条回答 默认 最新

  • dragon7088 2013-10-16 18:54
    关注

    Session data or cookies would be the way to go. You would want to set this when the user selects a portal. Then, you would check that the user is on the right portal by getting the current url. I'm positive there is a Drupal hook for this.

    For reading the cookie/session data there are a couple ways to do this. Firstly, you would probably need to create a module to do this. Drupal has rules and hooks so that you could run your portal routing code only on specific pages. The other option is to run that code on every page load, but that is not recommended by Drupal and it's followers.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog