Customer Content Screen Hooks
The twenty-seven placement points of the home page, content, the knowledge base and the sign-in forms.
Overview
The placement points on the pages open to visitors live here: the home page, content and the blog, contact, the knowledge base and the sign-in forms.
Most of these pages are open to everyone. A script you place here is run by anyone not signed in, and anything depending on a session comes out empty.
Reference
After the home hero
Appears after the opening block of the home page.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.home.hero.after', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});The end of the home sections
Appears at the end of the home page sections.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.home.sections.end', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});The top of a content page
Appears at the top of the content pages.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.content.top', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});After the page content
Appears after the content of a plain page.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.content_page.content.after', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});After a blog article
Appears after the body of a blog article. It suits an author box or related posts.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.blog_detail.content.after', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});After the blog feed
Appears after the blog list.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.blog_list.feed.after', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});After the news feed
Appears after the news list.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.news_list.feed.after', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});After the reference content
Appears after the content of a reference page.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.reference_detail.content.after', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});The top of the contact form
Appears above the contact form.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.contact.form.top', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});The bottom of the contact form
Appears below the contact form. If you add a field, handling the submitted value is your job.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.contact.form.bottom', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});The bottom of the contact sidebar
Appears at the bottom of the side column on the contact page.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.contact.aside.bottom', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});After the domain search
Appears after the domain search box.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.domain.search.after', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});The top of the knowledge base landing
Appears at the top of the knowledge base landing page.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.kb_landing.content.top', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});The bottom of the knowledge base landing
Appears at the bottom of the landing page.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.kb_landing.content.bottom', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});After the search box
Appears after the knowledge base search box.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.kb_landing.search.after', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});After the category header
Appears after the header of a category page.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.kb_category.header.after', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});The bottom of the category content
Appears at the bottom of the category page content.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.kb_category.content.bottom', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});After the table of contents
Appears after the table of contents of an article.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.kb_article.toc.after', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});After the article content
Appears after the article body. It suits a feedback area or related articles.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.kb_article.content.after', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});The article footer
Appears in the footer of an article.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.kb_article.footer', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});The top of the knowledge base sidebar
Appears at the top of the knowledge base side column.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.kb_sidebar.top', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});The bottom of the knowledge base sidebar
Appears at the bottom of the side column.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.kb_sidebar.bottom', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});The bottom of the sign-in form
Appears below the sign-in form. That page is open to everyone: a script placed here runs for anyone not signed in.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.login.form.bottom', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});The bottom of the sign-up form
Appears below the sign-up form. If you add an extra consent, enforce it yourself.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.register.form.bottom', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});The bottom of the password recovery form
Appears below the password recovery form.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.auth.forget.form.bottom', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});The bottom of the password reset form
Appears below the password reset form.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.auth.reset.form.bottom', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});After the invitation actions
Appears after the actions on the sub-user invitation page. The invited person may hold no account yet.
null and false are skipped, so return null when you have nothing to add. The output enters the page unescaped — clean anything coming from outside yourself.Hook::add('ui:client.auth.invite.actions.after', 10, function () {
return '<div class="alert alert-info">Acme</div>';
});Pitfalls
Code you place on the sign-in, sign-up and content pages is run by anyone, identified or not. Keep internal details, keys and anything meant only for a customer out of them.
The sub-user invitation page can open for somebody with no record at all in the system. Output depending on a session or an existing customer record comes out empty there.
Related Articles
Thanks for your feedback!
Our support team is here around the clock for anything you can't find above.