Not understanding "Header Extra Content"

Permalink
I'm not sure how this is used, so if my assumptions aren't valid - I appreciate some feedback. I'm wanting to attached selectively on a page basis a <?PHP ?> snippet just after the <head> statement.
It looks like Custom Attributes - Header Extra Content will do the job. I've entered a simple <!-- TEST --> string and nowhere does this showup when viewing "view page source" content with by browser.

Is there a Concept5 method to call to retrieve HeaderExtraContent?

-Den

 
12345j replied on at Permalink Reply
12345j
http://www.concrete5.org/index.php?cID=11369
scroll down to powermicks comment.
tdpss555 replied on at Permalink Reply
Interesting threads. As usual, following various discussions in the forum is always enlightening. Helped a little, but I still don't know how the C5 designers meant "Header Extra Content" to be used.
Maybe, I should further simply what I'd like to do. That is use a database parameter based on the selected page that can control sections of a PHP block just after <head> tag. I realize that a URL parameter could be passed, but I'd rather not get this requirement wrapped up in the Menu Navigation links. Still looking for ideas if anyone has one.
jordanlev replied on at Permalink Reply
jordanlev
I don't think you can use the "Header Extra Content" to supply variables to PHP code running on your page. Instead you will want to create a custom attribute for the page (via Dashboard -> Pages and Themes -> Attributes). That attribute is set when the page is first created, or can be changed on a page that already exists by editing the page, clicking "Properties" in the toolbar and then clicking the "Custom Attributes" tab.

To retrieve the value of that custom attribute in your PHP code, do something like this:
$c->getCollectionAttributeValue('my_attribute_handle');
cainKuri replied on at Permalink Reply
cainKuri
I just discover this section of Header Extra Content and it's amazing... you dont have to deal a lot with server, ftp, folders templates and find your php files, modify them, upload the files again and refresh your pages to see the changes (as i just use to do)... i was doing all that to put the backstretch in my site.

You will find a lot of things now that you have to put in your HEADER sections of your pages in order to run certainly pluggins... but i use to put in the "root" of all pages, so it took time. I read also one of good practices is to put all javascripts at the end of your pages, preferally at the footer, so is faster the load-time of the site.

With this you can save a lot of problem and do it rightaway in this section.
wyso replied on at Permalink Reply
wyso
yup, the function just rocks!