Re: Re: 特定のページだけを階層を含めたメニュー表示にする
2016年7月7日 at 15:04
せいけんさま
> autonavのview.phpを加工すればよいかとおもっていたのですが
カスタムテンプレートを制作されたことがあるということですので、以下の記述を autonav のview.php をもとにカスタマイズしてください。
//*** Step 2 of 2: Output menu HTML ***/
$th = Loader::helper('text');
$nh = Loader::helper('navigation');
$parent = Page::getByID($c->getCollectionParentID());
$parentLink = $nh->getCollectionURL($parent);
$parentName = $th->entities($parent->getCollectionName());
if (count($navItems) > 0) {
echo '<h3><a href="' .$parentLink. '">' .$parentName. '</a></h3>';
echo '<ul class="nav">'; //opens the top-level menu
現在のページの親ページのリンクとタイトルを取得して表示しています。
あとは適宜修正してください。
よろしくお願いします。
Your post has been saved and will be published after approval by the forum moderator.