Forum

Thread tagged as: Question, Problem, Docs
Drew McLellan

Drew McLellan 2638 points
Perch Support

That has template tags - are you misunderstanding what I'm asking for, or are you using template tags outside of a template?

Hi,

I am using the tag outside.

I want to use the title tag in the breadcrumb template so we output the title at the end of the breadcrumb.

Regards

Drew McLellan

Drew McLellan 2638 points
Perch Support

You can't use template tags in your PHP pages - only in templates.

Drew McLellan said:

You can't use template tags in your PHP pages - only in templates.

I'm not asking to get it in a page. I'm asking to display the tag in another template, breadcrumbs.html.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Why do you have template tags in your page?

Hi Drew,

Are you meaning portfolio.php? If so there are no template tags in there Drew :(

Drew McLellan

Drew McLellan 2638 points
Perch Support

I asked you to show me your page and you showed me a bunch of template code. Is that not your page?

Morning Drew.

This is my portfolio page. I don't see template tags!

I am trying to get a tag from my portfolio item and display it on the breadcrumb

<?php include( 'perch/runtime.php');?>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->

<head>
    <title>
        <?php perch_pages_title(); ?> </title>
    <?php perch_layout( 'global.meta'); ?>
    <?php perch_layout( 'global.fileassets'); ?> </head>

<body>
    <!--[if lt IE 7]>
          <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->
    <?php perch_layout( 'global.header'); ?>
    <!-- nav -->
    <nav class="uk-navbar uk-visible-large">
        <div class="uk-container uk-container-center">
            <?php perch_pages_navigation(array( 'from-path'=> '/', 'hide-extensions' => true, 'include-parent' => true, 'template' => 'main-nav.html', ));?> </div>
    </nav>
    <!-- nav end -->
    <!-- slider -->

    <!-- slider end -->
    <!-- portfolio items -->
    <div class="page-header">
            <div class="uk-container uk-container-center">
            <div class="uk-grid uk-flex uk-flex-middle uk-margin-top uk-margin-bottom">
            <div class="uk-width-medium-1-2">
                <h2><?php perch_pages_title(); ?></h2>
            </div>
                <div class="uk-width-1-2 uk-float-right"><?php
$title = perch_content_custom('title', array(
    'page'=>'/portfolio.php'
), true);
echo $title;
perch_pages_breadcrumbs(); ?></div>
            </div>
            </div>
        </div>
    <div class="uk-container uk-container-center uk-margin-top uk-margin-bottom">
        <div class="uk-grid uk-margin-bottom uk-margin-top" data-uk-grid-margin>
            <div class="uk-width-medium-1-1 uk-flex-middle">
                <?php
    perch_content_create('Portfolio', array(
      'template'   => 'portfolio_item.html',
      'multiple'    => true,
      'edit-mode' => 'listdetail',
    ));
    ?>
    <?php
    perch_content_custom('Portfolio', array(
      'template' => 'portfolio_listing.html',
    ));
    ?>
            </div>

        </div>
    </div>
    <!-- portfolio items end -->


    <?php perch_layout( 'global.footer'); ?>
    <!-- Off canvas menu -->
    <div id="sidemenu" class="uk-offcanvas">
        <div class="uk-offcanvas-bar">
            <?php perch_pages_navigation(array( 'from-path'=> '/', 'hide-extensions' => true, 'include-parent' => true, 'template' => 'offcanvas.html', ));?>
            <div class="uk-text-center uk-margin-large-top"> <img src="/images/logo-vert-nav.png" width="198" height="144" alt="company logo vert"> </div>
        </div>
    </div>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script src="/js/uikit.min.js"></script>
    <script src="/js/plugin.js"></script>
    <script src="/js/main.js"></script>
    <script src="/js/retina.min.js"></script>
    <script src="/js/components/slideshow.min.js"></script>
    <script src="/js/components/slideshow-fx.min.js"></script>
    <script src="/js/components/cover.min.js"></script>
    <script src="/js/components/grid.min.js"></script>
    <script src="/js/components/sortable.min.js"></script>
    <!-- Google Analytics ID -->
    <script>
    (function(i, s, o, g, r, a, m) {
        i['GoogleAnalyticsObject'] = r;
        i[r] = i[r] || function() {
            (i[r].q = i[r].q || []).push(arguments)
        }, i[r].l = 1 * new Date();
        a = s.createElement(o),
            m = s.getElementsByTagName(o)[0];
        a.async = 1;
        a.src = g;
        m.parentNode.insertBefore(a, m)
    })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
    ga('create', 'UA-47548290-1', 'auto');
    ga('send', 'pageview');
    </script>
</body>
</html>
Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, that's not what you showed me before when I asked for the code on your page. So it looks like you're not in quite as much of a mess as it appeared. This still isn't your detail page though, is it?

We're nearly 70 posts into this thread and no further forward. I really don't think I can help you.