在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/PHP/ typecho 如何在主循環(huán)中獲取到當前元素的index

typecho 如何在主循環(huán)中獲取到當前元素的index

需求

希望在文章前加一個倒序的列表。

不用CID的原因是CID 不連續(xù)

相關代碼

<?php while($this->next()): ?>
        <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
            <h2 class="post-title" itemprop="name headline"><a itemprop="url" href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h2>
        </article>
    <?php endwhile; ?>

預期解答

變量名,如$this->index()

回答
編輯回答
冷溫柔
$this->sequence
2017年9月10日 03:25