当前位置: 首页>>代码示例>>PHP>>正文


PHP Resource::getThemePath方法代码示例

本文整理汇总了PHP中source\libs\Resource::getThemePath方法的典型用法代码示例。如果您正苦于以下问题:PHP Resource::getThemePath方法的具体用法?PHP Resource::getThemePath怎么用?PHP Resource::getThemePath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在source\libs\Resource的用法示例。


在下文中一共展示了Resource::getThemePath方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: beginLoopData

 public function beginLoopData($dataSource, $item, $appendOptions = [])
 {
     $options = [];
     $options['dataSource'] = $dataSource;
     $options['item'] = Resource::getThemePath($item);
     return LoopData::begin($options);
 }
开发者ID:snowbai,项目名称:lulucms2,代码行数:7,代码来源:BaseView.php

示例2:

                </div>
            </div>
        </div>
        <div id="comment-ad" class="banner banner-related">
        </div>
        <a name="comments"></a>

        <div class="ds-thread" data-thread-key="3975" data-author-key="1" data-title="" data-url=""></div>


    </div>
</div>
<aside class="sidebar">

    <?php 
echo $this->render(Resource::getThemePath('/views/_inc/takonomy'), ['takonomyId' => 'page_takonomy']);
?>
    <div class="widget d_postlist">
        <div class="title">
            <h2>为您推荐</h2>
        </div>
        <ul>
            <?php 
$datas = $this->getDataSource(null, null, 5, ['is_pic' => true]);
$this->loopData($datas, '/views/_inc/item_pic');
?>
        </ul>
    </div>
    <div class="widget d_postlist">
        <div class="title">
            <h2>热评文章</h2>
开发者ID:shunzi250,项目名称:lulucms2,代码行数:31,代码来源:detail_default.php

示例3:

    ?>
            		<li><?php 
    echo Html::a($takonomy['name'], ['/post/default/list', 'takonomy' => $takonomy['id']]);
    ?>
</li>
            		<?php 
}
?>
            	</ul>
            	
            </div>
            <div class="widget d_postlist">
                <div class="title"><h2>热评文章</h2></div>
                <ul>
                	<?php 
echo $this->render(Resource::getThemePath('/views/_inc/post_list_widget'), ['orderBy' => 'comment_count desc', 'limit' => 3]);
?>
                </ul>
            </div>
            <div class="widget ds-widget-recent-visitors">
                <div class="title"><h2>最近访客</h2></div>
                <ul class="ds-recent-visitors" data-num-items="15" data-show-time="0" data-avatar-size="50">
                </ul>
            </div>
            <script>
                if (typeof DUOSHUO !== 'undefined')
                    DUOSHUO.RecentVisitors('.ds-recent-visitors');
            </script>
        </aside>

    
开发者ID:merlinxie,项目名称:lulublog,代码行数:29,代码来源:list_default.php

示例4:

            	</ul>
            	
            </div>
            <div class="widget d_postlist">
                <div class="title"><h2>为您推荐</h2></div>
                <ul>
                    <?php 
echo $this->render(Resource::getThemePath('/views/_inc/content_list'), ['orderBy' => 'created_at desc']);
?>
               </ul>
            </div>
            <div class="widget d_postlist">
                <div class="title"><h2>热评文章</h2></div>
                <ul>
                    <?php 
echo $this->render(Resource::getThemePath('/views/_inc/content_list'), ['orderBy' => 'created_at desc']);
?>
                </ul>
            </div>
            <div class="widget ds-widget-recent-visitors">
                <div class="title"><h2>最近访客</h2></div>
                <ul class="ds-recent-visitors" data-num-items="15" data-show-time="0" data-avatar-size="50">
                </ul>
            </div>
            <script>
                if (typeof DUOSHUO !== 'undefined')
                    DUOSHUO.RecentVisitors('.ds-recent-visitors');
            </script>
        </aside>

    
开发者ID:merlinxie,项目名称:lulublog,代码行数:29,代码来源:detail_default.php

示例5:

use source\LuLu;
/* @var $this yii\web\View */
if (!isset($orderBy)) {
    $orderBy = 'created_at desc';
}
if (!isset($limit)) {
    $limit = 5;
}
if (!isset($item)) {
    $item = 'item_pic';
}
$where = [];
if (!isset($isPic)) {
    $isPic = true;
}
$moduleId = LuLu::$app->controller->module->id;
if ($moduleId !== 'app-frontend') {
    $where = ['content_type' => $moduleId];
}
$query = Content::findQuery($where, $orderBy);
if ($isPic) {
    $query->andWhere(['!=', 'thumb', '']);
}
$query->limit($limit);
$contents = $query->all();
?>

<?php 
foreach ($contents as $content) {
    echo $this->render(Resource::getThemePath('/views/_inc/' . $item), ['content' => $content]);
}
开发者ID:merlinxie,项目名称:lulublog,代码行数:31,代码来源:content_list.php


注:本文中的source\libs\Resource::getThemePath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。