GitHub smart answer
A GitHub smart answer are more complex as it can contain varibles or calculations.
How it works
A GitHub smart answer presents the end-user a series of questions, which can contain complicated variables or calculation. Based on their responses, the GitHub smart answer will channel the end-user to a certain outcome.
Github smart answers are made up of:
- logic in Ruby (
.rb
) files - data in YAML (
.yml
) files - content in Ruby (
.erb
) templates
Live examples
Complete list of examples available and page data on Content Data.
How it's built
These are the underlying technologies that make-up the github smart answer front template.
Content schema
What is a content schema?
Content type
smart_answer
What is a content type?
document_type
. It powers search filters in all finders and changes the content type label users see on GOV.UK pages.
Rendering app
What is a rendering app?
Components
Component | Source | Publishing app input field(s) |
---|---|---|
Layout super navigation header | Autogenerated in frontend template | |
Contextual breadcrumbs | Autogenerated in frontend template | |
Page title | Hardcoded by developer | |
Govspeak content | Hardcoded by developer | |
Button | Hardcoded by developer | |
Heading | Hardcoded by developer | |
Related navigation when displayed within contextual footer | Hardcoded by developer | |
Related navigation when displayed within contextual sidebar | Hardcoded by developer | |
Feedback | Autogenerated in frontend template | |
Layout footer | Autogenerated in frontend template | |
Select can be used in order for end-user to provide their respone | Hardcoded by developer | |
Form radio button can be used in order for end-user to provide their respone | Hardcoded by developer | |
Summary list can be used in order for end-user to provide their respone | Autogenerated in frontend template | |
Error summary appears whenever a required field is not entered or the incorrect information is entered by the end-user | Autogenerated in frontend template | |
Step by step navigation when displayed within contextual sidebar | Customized by publisher | collections-publisher > Where to show this step by step > Sidebar settings > Sidebar content of page |
Form date input can be used in order for end-user to provide their respone | Hardcoded by developer |
Help improve this frontend template
To help make sure that this page is useful, relevant and up to date, instructions on how to contribute can be found on the GitHub repository (opens in a new tab).