Jump to content

michaelriordan

Members
  • Posts

    3
  • Joined

  • Last visited

michaelriordan's Achievements

Newbie

Newbie (2/6)

2

Reputation

  1. Thanks -- Ah, I see why I confused $content and $bodycopy ... $content worked perfectly. I think I started with the blank processwire profile, but not sure how I would find this... I'll keep learning... everything's working fine for now though.
  2. Thanks. I get the idea now. I've read the delayed output article. But still no idea how to get custom fields to output. I want delayed output, because I want header, footer and sidebar to display I've tried the following, with and without the 'get()' in $page->get()", and it only displays the person_name field: <?php $headline = $page->get("title"); $bodycopy = "<h1>" . $page->get("person_name") . "</h1><h2>Manuscript: " . $page->get("library") . "</h2><p>" . $page->get("manuscript") . "</p><p>Reference" . $page->get("reference") . "</p><p>" . $page->get("note") . "</p>"; $sidebar = $page->sidebar; include("./main.inc"); Here's an example of the output: https://michaelriordan.hostiso.host/p/gilbert-burnet/ "Gilbert Burnet" is person_name... The file source has: <div id='content'> <h1>Gilbert Burnet</h1> </div> I must be misunderstanding something here. Why does $bodycopy give up after finding the first field....
  3. I am experimenting with making a new template, and managed to set up a working Planets template a la Ryan Cramer's discussion at https://processwire.com/docs/tutorials/hello-worlds/ However, I have tried to get this to work with my own code, but get an XML parsing error: <html> <head> <title><?php echo $page->title; ?></title> </head> <body> <h1><?php echo $page->person_name; ?></h1> <h2>Manuscript: <?php echo $page->library; ?></h2> <p><?php echo $page->manuscript; ?></p> <p>Reference <?php echo $page->reference; ?></p> <p><?php echo $page->note; ?></p> </body> </html> There's no white space at the end of my code. I thought it could be something wrong with the processwire code, but the Planets example worked for me. I have checked, and tripple-checked my field names. Any thoughts?
×
×
  • Create New...