douqiao5543 2010-05-03 23:20
浏览 64
已采纳

Drupal - 没有自我链接

I'm using the built-in Path module to change Drupal Page links from a format like "/node/1234" to "/about-us". The latter link format is easier to read and is SEO friendly.

At the top of every page is the primary navigation. Currently when viewing the /about-us page the primary navigation links are displayed as follows:

Home | About Us | Contact Us

Notice that the /about-us page is linking to itself (self-linking). Instead, the primary navigation on the about-us page should look like this:

Home | About Us | Contact Us

Is it possible for Drupal to detect which Page is loaded and then refrain from displaying a link to the current page? A Page should never link to itself.

  • 写回答

1条回答 默认 最新

  • douren1928 2010-05-03 23:39
    关注

    You will probably have to get into some custom theme/module development to make this happen unless you can find a third-party module to do this for you (I don't know of any, I'm afraid). I can recommend VanDyk's "Pro Drupal Development" for getting started in that whole world. Then poke around in /includes/menu.inc to get an idea of how the menus are constructed and what theme functions you can override.

    Alternately, if Javascript-disabled people aren't too much concern for you, you could always write some quick jQuery (or whatever your preferred tool is) to remove the link from the currently viewed page.

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

报告相同问题?

悬赏问题

  • ¥20 求用stm32f103c6t6在lcd1206上显示Door is open和password:
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类