CMS Theme

The function hook_css_alter() lets you replace, add, or substractCSS files from the page prior to the files beding output. Viewsgoes through a relativaely long process from starting a view tofinally presenting rendered output to the user. First, the view hasto be loaded and argument input given. Then, handlers and pluginshave to be instantiated, pager data loaded into the view, and theexposed forms executed to get the input. After that, the buildprocess will go through all of the handlers, which can add theirown data to the query. The query is executed, and finally the styleand handlers render the view.


Deep study on K2 theme;

1. Entrypoint page index.php;

From the index.php, we can clearly see that it breaks the page intothree parts: header part; content part and footer part.

As for the header part, it use get_header() function to get thecontents.In the main content, it also contains two parts: primaryparts and sidebar part.There are three elements : notices, dynamiccontent and main content in the primary area. For the sidebar area,it also use the get_sidebar() function to fetch the relatedcontent.

Following the standard, get_footer() method is used to render thefooter's content.

2.Let me tell the stroy about get_header()

get_header() method can accept one paramter $name which providesone way to customize the default header page.When you pass the$name to get_header() method, it will use header-$name.php templateinstead of header.php.

There is another thing which need to be emphasized. It invokes theget_header action.By search, we can know clearly the methods whichbind to this action.



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值