You can use hooks to interact with the Flex Skin in a programmatic way. This is great for developers or webmasters who need to inject content (or anything else) in a scalable, flexible manner.
Hooks Common to All Templates
hook_top_body— insert anything before the HTML output (just after the opening<body>tag) on every pagehook_bottom_body— insert anything after the HTML output (just before the closing</body>tag) on every page
Template- and Context-specific Hooks
In the Flex Skin, the following elements each have four hooks associated with them by default:
Blog/Archives Templates:
content_containercontent_sectionhomepost_image_rowpost_containercontent_columnpost_headlinepost_excerptpost_footer
pagination_sectionpagination_container
footer_sectionfooter_container
Single Template:
content_containerbyline_sectionbyline_container
content_sectionpost_columnscontent_columnsingleheadline_area
sidebar_columnsidebar
author_sectionauthor_container
cta_sectioncomments_sectioncomments_containercomment_listcomment_head
comment_form_sectioncomment_form_containercomment_form
footer_sectionfooter_container
Front Page Template:
content_containerlatest_sectionlatest_containerfront_latest_posts
cta_sectionfooter_sectionfooter_container
Page Template:
content_containercontent_sectionpost_columnscontent_columnpageheadline_area
sidebar_columnsidebar
footer_sectionfooter_container
No Sidebar/Landing Template:
content_containercontent_sectionpost_columnscontent_columnpageheadline_area
footer_sectionfooter_container
If each of the above elements can be represented by $hook, then the four hooks available on each element are as follows:
hook_before_$hook(before the opening tag)hook_top_$hook(just after the opening tag)hook_bottom_$hook(just before the closing tag)hook_after_$hook(after the closing tag)
To illustrate, using the header element as an example, these are the four hooks:
hook_before_header(before the opening tag)hook_top_header(just after the opening tag)hook_bottom_header(just before the closing tag)hook_after_header(after the closing tag)
The trackbacks element only includes before and after hooks.
As you can see, the Flex Skin provides a ton of specific hook locations for you to reference. And if you don’t see an available hook where you want to inject some content, you can always create your own hooks wherever you want!