[inmediahk] block 標題使用html, 特別的 'more' 連結

大家可能經常遇到一個問題, 就是想使用一個帶有html 的block title
我也看見過其他人在論壇上討論過, 得出使用一個module 的解答

但便用了另一個方法, 給大家參考
因為這次要將首頁右邊的一些block 的title 連到一些頁面
而它們都是使用views 的
很自然便使用views 的"標題" 功能, html 輸出
但我發覺一個小妙用
就是將標題用 包起, 放在在views 的 block header 中, 選用full html
這樣就連CSS 都不用改, 原生已經變成block title 使用的樣式了

還有一點要留意, 用這個方法的話,
empty text 是不會輸出title 的
所以, empty text 也要使用 加標題

這個方法的還有一個延伸應用
就是block 底的 "more" 連結
同樣, views 的footer 使用 便可以使用任何自定義的連結
而獨立媒體的行動日誌便是使用了這個方法
令一個views 的block 連到另一個 views 的頁面的

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <h4> <h3>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options