制作了一个独立页面,想提取nhk官方站点的音频链接,做完之后准备添加一段说明。很久没有改动主题,命令都已经忘得一干二净了,下载了typecho的安装包,查看了一下page页的编码:
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div class="col-mb-12 col-8" id="main" role="main">
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<h1 class="post-title" itemprop="name headline"><a itemprop="url" href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h1>
<div class="post-content" itemprop="articleBody">
<?php $this->content(); ?>
</div>
</article>
<?php $this->need('comments.php'); ?>
</div><!-- end #main-->
<?php $this->need('sidebar.php'); ?>
<?php $this->need('footer.php'); ?>
制作完独立页面之后,在页面编辑框内输入的文字,可以用以下命令提取,似乎post文章的内容输出也是这个命令:
<?php $this->content(); ?>