grumpy Posted May 13, 2015 Share Posted May 13, 2015 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? Link to comment Share on other sites More sharing options...
cstevensjr Posted May 13, 2015 Share Posted May 13, 2015 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. Link to comment Share on other sites More sharing options...
LostKobrakai Posted May 13, 2015 Share Posted May 13, 2015 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? Link to comment Share on other sites More sharing options...
grumpy Posted May 13, 2015 Author Share Posted May 13, 2015 (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 May 13, 2015 by Macrura member did not use code format Link to comment Share on other sites More sharing options...
cstevensjr Posted May 13, 2015 Share Posted May 13, 2015 (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 May 13, 2015 by cstevensjr Corrected information Link to comment Share on other sites More sharing options...
Macrura Posted May 13, 2015 Share Posted May 13, 2015 When viewing my website in a browser the contents of Summary are not displayed. when you say viewing, what do you mean? Link to comment Share on other sites More sharing options...
grumpy Posted May 13, 2015 Author Share Posted May 13, 2015 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. Link to comment Share on other sites More sharing options...
Macrura Posted May 13, 2015 Share Posted May 13, 2015 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. 3 Link to comment Share on other sites More sharing options...
grumpy Posted May 13, 2015 Author Share Posted May 13, 2015 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. Link to comment Share on other sites More sharing options...
SiNNuT Posted May 13, 2015 Share Posted May 13, 2015 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. 1 Link to comment Share on other sites More sharing options...
grumpy Posted May 14, 2015 Author Share Posted May 14, 2015 Thanks, guys. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now