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条)

报告相同问题?

悬赏问题

  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥20 测距传感器数据手册i2c