We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Problem

List & Detail pages Category Links & Titles not showing

Hi there, I have followed the 'Portfolio with Categories' tutorial (https://docs.grabaperch.com/video/v/portfolio-with-categories/) and managed to get everything working except for displaying my selected Category links and Titles on my item detail page.

The correct Set names appear in separate lists including the correct amount of list items to match the amount of Categories I select in the item detail template form but not the links to or the titles of the selected categories.

DIagnostics

Summary information
Perch: 3.0.1, PHP: 7.1.5, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $, with PDO
Server OS: WINNT, apache2handler
Installed apps: content (3.0.1), assets (3.0.1), categories (3.0.1), perch_blog (5.6.1), perch_backup (1.2), perch_mailchimp (3.1)
App runtimes: <?php $apps_list = [ 'perch_blog', 'perch_mailchimp', 'content', 'categories', ]; ?>
PERCH_LOGINPATH: /perch
PERCH_PATH: C:\MAMP\htdocs\perch
PERCH_CORE: C:\MAMP\htdocs\perch\core
PERCH_RESFILEPATH: C:\MAMP\htdocs\perch\resources
Image manipulation: GD Imagick
PHP limits: Max upload 20M, Max POST 30M, Memory: 256M, Total max file upload: 20M
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
Resource folder writeable: Yes
HTTP_HOST: localhost
DOCUMENT_ROOT: C:/MAMP/htdocs
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

Template (Item Detail Page)


<perch:before> <section class="content-section-b <perch:content id="title" hide="true"/> profile"> <div class="container"> <div class="row"> </perch:before> <!--Cover--> <div class="col-sm-5 col-md-6"> <figure> <img class="img-fluid border" src="<perch:content id="cover" type="image" label="Cover" bucket="covers" order="5" required="true" />" alt="" /> </figure> </div> <!--Details--> <div class="col-sm-7 col-md-6"> <nav> <div class="nav nav-tabs" id="nav-tab" role="tablist"> <a class="nav-item nav-link active" id="nav-home-tab" data-toggle="tab" href="#nav-home" role="tab" aria-controls="nav-home" aria-selected="true">Profile</a> <a class="nav-item nav-link" id="nav-profile-tab" data-toggle="tab" href="#nav-profile" role="tab" aria-controls="nav-profile" aria-selected="false">Categories</a> </div> </nav> <div class="tab-content" id="nav-tabContent"> <div class="tab-pane fade show active" id="nav-home" role="tabpanel" aria-labelledby="nav-home-tab"> <!--Date--> <div class="row"> <div class="col-12 align-self-center"> <span class="small"> <em> <p class="date"> Updated:&nbsp;<perch:content id="date" type="date" label="Date" format="%d %B %Y" required="true" order="7" /> </p> </em> </span> </div> </div> <!--Date/Title/Logo--> <div class="row"> <!--Company Name--> <perch:content id="download_company_name" order="1" type="select" suppress="true" label="Company" options="ECS, LAPP, Moxa, Ls, EKD, MTS, Wieland, Delta, Icotek" allowempty="true" required="true" /> <!--Title--> <div class="col-sm-9 align-self-center"> <h1><perch:content id="title" type="text" label="Download title" required="true" title="true" order="2" /></h1> </div> <!--Logo--> <div class="col-sm-3 align-self-center"> <img class="img-fluid" src="<perch:content id="logo" type="image" label="Logo" order="3" />" alt="<perch:content id="title" hide="true"/> Logo" /> </div> </div> <!--Description--> <div class="row"> <div class="col-12"> <perch:content id="desc" type="textarea" label="Description" textile="true" order="4" /> </div> </div> <!--Download--> <div class="row"> <div class="col-12 align-self-center"> <p class="link-button"> <a href="/perch/resources/downloads/<perch:content id="download_company_name" />/<perch:content id="resourceDownload" type="text" label="File Name" help="Only requires filename with file extension" required="true" order="6" />" target="_blank"> <input type="button" value="DOWNLOAD"> </a> </p> </div> </div> </div> <div class="tab-pane fade" id="nav-profile" role="tabpanel" aria-labelledby="nav-profile-tab"> <!--Categories--> <div class="row"> <!---------------------------------------------- Category ----------------------------------------------------> <perch:categories id="company" label="Company" set="company" divider-before="Categories" required> <perch:before> <div class="col-12"> <h6>Company</h6> <ul class="tags"> </perch:before> <li><a href="/category/<perch:category id="catPath">"><perch:category id="catTitle"></a></li> <perch:after> </ul> </div> </perch:after> </perch:categories> <!---------------------------------------------- Category ----------------------------------------------------> <perch:categories id="industry" label="Industry" set="industry" required> <perch:before> <div class="col-12"> <h6>Industry</h6> <ul class="tags"> </perch:before> <li><a href="/category/<perch:category id="catPath">"><perch:category id="catTitle"></a></li> <perch:after> </ul> </div> </perch:after> </perch:categories> <!---------------------------------------------- Category ----------------------------------------------------> <perch:categories id="application" label="Application" set="application" required> <perch:before> <div class="col-12"> <h6>Application</h6> <ul class="tags"> </perch:before> <li><a href="/category/<perch:category id="catPath">"><perch:category id="catTitle"></a></li> <perch:after> </ul> </div> </perch:after> </perch:categories> <!---------------------------------------------- Category ----------------------------------------------------> <perch:categories id="catalogueType" label="Catalogue Type" set="catalogue-type" required> <perch:before> <div class="col-12"> <h6>Catalogue Type</h6> <ul class="tags"> </perch:before> <li><a href="/category/<perch:category id="catPath">"><perch:category id="catTitle"></a></li> <perch:after> </ul> </div> </perch:after> </perch:categories> </div> </div><!--end "tab-content"--> </div><!--end "row"--> <perch:after> </div> </div> </section> </perch:after> <perch:content id="slug" for="title" type="slug" suppress="true" /> <perch:content id="logo" type="image" label="Image" suppress="true" /> <perch:content id="cover" type="image" label="Image" suppress="true" />

Category List output on item detail page

<div class="row">   

<!---------------------------------------------- Category ---------------------------------------------------->

            <div class="col-12">
                <h6>Company</h6>
                 <ul class="tags">

                <li><a href="/category/"></a></li>

                </ul>
            </div>

    <!---------------------------------------------- Category ---------------------------------------------------->

            <div class="col-12">
                <h6>Industry</h6>
                 <ul class="tags">

                <li><a href="/category/"></a></li>

                <li><a href="/category/"></a></li>

                <li><a href="/category/"></a></li>

                <li><a href="/category/"></a></li>

                </ul>
            </div>

    <!---------------------------------------------- Category ---------------------------------------------------->

            <div class="col-12">
                <h6>Application</h6>
                 <ul class="tags">

                <li><a href="/category/"></a></li>

                <li><a href="/category/"></a></li>

                <li><a href="/category/"></a></li>

                <li><a href="/category/"></a></li>

                <li><a href="/category/"></a></li>

                <li><a href="/category/"></a></li>

                <li><a href="/category/"></a></li>

                <li><a href="/category/"></a></li>

                </ul>
            </div>

    <!---------------------------------------------- Category ---------------------------------------------------->

            <div class="col-12">
                <h6>Catalogue Type</h6>
                 <ul class="tags">

                <li><a href="/category/"></a></li>

                </ul>
            </div>

</div>

Some help would be greatly appreciated. Thanks.

Gavin Mills

Gavin Mills 0 points

  • 1 year ago
Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

Hello Gavin,

You're using a version older than 3.1, so your tags need to be self-closed />:

<perch:category id="catTitle" />

This is noted in the Template Reference section of the docs if you wish to read more about the template changes in 3.1: https://docs.grabaperch.com/templates/

Thanks Hussein nice spotting, that worked so I have updated to 3.1 now so no more problems with the templates changes.

All the best.

Thanks for the example. That would definitely fit our requirements at https://writemyessaytoday.net/. Our e-mail. milenaglenroad@gmail.com

We will provide you with skilled writers, as well as with a full set of all other necessary conditions https://www.hot-essay.com/assignment-help-how-to-find-a-good-company. Thus, you will solve any academic duty.