国外设计欣赏网站 - DOOOOR.com

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,微信登陆

搜索

[Drupal模块] Drupal 7 hide node title /drupal 7隐藏页面标题

[复制链接]
发表于 11-14-2011 23:42 | 显示全部楼层 |阅读模式
D6的时候用的title 模块D7用Automatic Nodetitles即可,并且也有D6版本的。不过这个不太方便,不确定最终能否完全隐藏,它的好处是可以用随机文字代替title。
最后找到最理想的超轻量级D6/7模块exclude node title完美解决!
5 ^% H9 d6 [0 u- W
. t! ]( X% f/ x1 n
- K1 Y3 i7 y' t" _. D/ Q
1 f8 _8 C7 e' l8 n/ P( M2 E
This module handles a very simple functionality, decide whatever to exclude a node title from full node page or node teasers.$ }  S/ J; B+ i6 c5 |
It provides a checkbox on node-edit pages for easier exclusion, or you can use the admin page to manually enter a list of node id's to exclude title.
- r. i- W. m" E0 NAlso provides the option to hide all titles of a certain Content type. From the administrative interface you can select a content type to hide title for.
: g# m; s+ u0 g4 BUse case: Let's say you create a content type called: Lightbox content, and in your layout lightbox content will have titles set on title attribute of the link, rather than inline on your page, so you would like to exclude title from displaying inline for all your nodes of type Lightbox content, simple, just check the option and voila.# ?# k% a* H; u% [
! u" ^) ~3 g. d5 p, C
This project has some other, very simple approaches, like hiding the title from CSS using display: none or applying the template_preprocess_page hook in your theme to make `title` variable null./ R2 q7 w# C. X' t+ `$ w% C
Actually `Exclude node title` does the same thing, only that you don't have to manually make different hacks, hard to track from the administration interface.
2 V5 o2 g( Q3 R$ F4 C3 D3 g2 t% P* A  A3 M/ r
                                                                                                                                                                                                                  感谢无须猫

|2011-2026-版权声明|平台(网站)公约|DOOOOR 设计网 ( 吉ICP备2022003869号 )

GMT+8, 2-21-2025 07:40 , Processed in 0.274250 second(s), 61 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表