//首页分页需要到配置里调整首页加载模式
    /**
     * 首页按钮
     * @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>
点赞(0)

评论列表 共有 0 条评论

暂无评论
立即
投稿
发表
评论
返回
顶部