Jump to content

Recommended Posts

Posted

Please can someone tell me why when I put text in the Summary box on a template (which includes the Summary field!) it doesn't display when viewed?

Posted

 You need to define in your template what will or won't display.  That's totally left up to you.   I normally have outputted information defined in the _main.php template.

Posted

Do you mean the summary field is not displaying text on the frontend or in the backend? If the latter, is it only collapsed or doesn't it even show text?

Posted (edited)

When viewing my website in a browser the contents of Summary are not displayed.

The head section of  _main.php reads:

<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title><?php echo $title; ?></title>
    <meta name="description" content="<?php echo $page->summary; ?>" />
    <link href='http://fonts.googleapis.com/css?family=Raleway:500' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>styles/main.css" />
    <script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?sensor=false'></script>
</head>
Edited by Macrura
member did not use code format
Posted (edited)

Ok, is your summary field that you are using actually called "summary" or something else?  If it's called something else, you need to modify the template to call whatever that field is.

Is there a template file associated with your template?

If so, Does your template file have this in it?

include("./_main.php");
Edited by cstevensjr
Corrected information
Posted

When viewing my website in a browser the contents of Summary are not displayed.

when you say viewing, what do you mean?

Posted

Macrura: When I say viewing I mean either selecting the page in admin and then selecting View, or alternatively browsing to the page in a web browser and viewing (looking at) it.

Posted

Ok thanks - in order to see the summary, you'll need to view source, or use the chrome dev tools and inspect element, then navigate to the head, to see your summary meta tag. Meta tags are not visible when viewing web pages.

  • Like 3
Posted

Ah.  That explains it.  Sorry - I thought it was just another field that would display.  Having looked at the page source I can see the content in the meta info in the head section.  I'll make an additional text field of my own to do the job.  Thanks for your help.

Posted

You can re-use page fields as many times as you want. If the content of the summary field suits your needs you can also echo it in other parts of the template file (or _main.php) . For it to be visible 'onscreen' it needs to be output somewhere between the html body, in a place of your liking.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...