Forum
Standard Navigation not working
Hi all ,
I Tried the standard navigation function with the template being as follows .
<perch:before><ul class="nav float-right"></perch:before>
<li class="nav-item"<perch:if exists="current_page"> class="selected"</perch:if>
<perch:if exists="ancestor_page"> class="ancestor"</perch:if>>
<a href="<perch:pages id="pagePath">"><perch:pages id="pageNavText"></a>
<perch:pages id="subitems" encode="false">
</li>
<perch:after></ul></perch:after>
The output i get is this .
<ul style="list-style: none">
<li>
<a href="/sample">
sample
</a>
</li>
</div>
Do let me know if im doing wrong here .
Im simply trying to output all my pages into navigation .
As of now i have 2 , which is Home & Sample .
Hello Titus,
The HTML output you included doesn't seem to match the template. How are you outputting the navigation? Are you specifying the template?
Sorry my bad .
Output is
I donot understand why the ul tag is not being closed . Also there are supposed to be two pages i.e Home and Sample . THis only shows Sample
Can you post your diagnostics report?
Perch Runway: 3.1.3, PHP: 7.2.7, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $, with PDO Server OS: WINNT, apache2handler Installed apps: content (3.1.3), assets (3.1.3), categories (3.1.3) App runtimes: <?php $apps_list = [ ]; PERCH_LOGINPATH: /shades/perch PERCH_PATH: C:\xampp\htdocs\shades\perch PERCH_CORE: C:\xampp\htdocs\shades\perch\core PERCH_RESFILEPATH: C:\xampp\htdocs\shades\perch\resources Image manipulation: GD PHP limits: Max upload 512M, Max POST 512M, Memory: 128M, Total max file upload: 128M F1: 3b606135b33e6a102526838f4152a807 Resource folder writeable: Yes HTTP_HOST: localhost DOCUMENT_ROOT: C:/xampp/htdocs REQUEST_URI: /shades/perch/core/settings/diagnostics/ SCRIPT_NAME: /shades/perch/core/settings/diagnostics/index.php
Update :
When i use the below template for navigation , the error happens :
But when i use just this alone , it works !
What is the difference in both , i literally couldn't find out .
Passing the navigation like this .
The entire template will be repeated for each item in the navigation, with the exception of the
perch:before
andperch:after
sections. Those are displayed once, before and after the items respectively.Yup , I know realize how dumb that question was .