onjegolders Posted January 15, 2013 Posted January 15, 2013 I just tried to implement headlines for the first time in a site and using the sample code of Ryan's: <?php echo $page->get("headline|title"); ?> I definitely have headline field attached to the template and it's not empty, not sure why the title is getting used and not the headline? Could anyone point in the right direction?
Valery Posted January 15, 2013 Posted January 15, 2013 Hi onjegolders, You might try printing out all the fields of your page as well as their values. You will see if your page's headline field is there or not. foreach($page->fields as $field) echo "<p>{$field->name}: " . $page->get($field->name) . "</p>"; 1
arjen Posted January 15, 2013 Posted January 15, 2013 Another way to display all fields is to use the "MarkupPageArray plugin module, which is installed by default and adds a render() function to all fields that return a PageArray (as many functions in ProcessWire do)." # echo $page->render(); 2
onjegolders Posted January 15, 2013 Author Posted January 15, 2013 Thanks guys, I'd obviously not saved the correct template as all is now working fine
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