dousa2794 2012-07-22 03:14
浏览 44
已采纳

Drupal 7 - 将内容和一段文本添加到页脚区域

I'd like to add the followings into footer region / block in drupal 7.

  1. A 'privacy' link to a content which is just a basic page content
  2. A piece of text 'Copyright 2012'

The footer will look like this Copyright 2012 | link to privacy

What is the best way to do this?

Thanks

  • 写回答

2条回答 默认 最新

  • duan1979768678 2012-07-22 04:31
    关注

    Go to Administer > Structure > Blocks and create a new block. You can enter title as "" to prevent title from printing. Enter you content, and choose an appropriate input format (full HTML, etc). Save it. Then, move the block to appropriate region. Most themes have a footer area that you drag and drop the block's handler to (not to the exact region. There is a drop zone middle of the page).

    You can also add this text page.tpl.php file in your theme's folder.

    You can embed links either using raw HTML or using PHP (which reflects correct URLs with path auto always). If you don't want to embed php in a block, which requires you to enable PHP Filter module (from core), put this in page.tpl.php.

    <div id="footer-text">
     <?php print l(t('Privacy policy'), 'node/5'); ?> | <?php print t('Copyright @year', array('@year' => date("Y"))); ?>
    </div>
    

    This should print the Privacy text linked to node/5 considering alias, and Copyright [year] with both labels translatable.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!