//首页分页需要到配置里调整首页加载模式
/**
* 首页按钮
* @param string $text
* @return string
*/
protected function getFirstButton($text = "首页")
{
if ($this->currentPage() getDisabledTextWrapper(__($text));
}
return $this->getPageLinkWrapper($this->url(1), __($text));
}
/**
* 末页按钮
* @param string $text
* @return string
*/
protected function getLastButton($text = "末页")
{
return $this->getPageLinkWrapper($this->url($this->lastPage), __($text));
}
快捷键:cms分页添加首页和末页
源:
sublime_text格式
<snippet>
<content><![CDATA[
//首页分页需要到配置里调整首页加载模式
/**
* 首页按钮
* @param string \$text
* @return string
*/
protected function getFirstButton(\$text = "首页")
{
if (\$this->currentPage() getDisabledTextWrapper(__(\$text));
}
return \$this->getPageLinkWrapper(\$this->url(1), __(\$text));
}
/**
* 末页按钮
* @param string \$text
* @return string
*/
protected function getLastButton(\$text = "末页")
{
return \$this->getPageLinkWrapper(\$this->url(\$this->lastPage), __(\$text));
}
]]></content>
<tabTrigger>cms分页添加首页和末页(cmsshouyemoye)</tabTrigger>
<scope></scope>
</snippet>
发表评论 取消回复