Themes are collections of template files. This page attempts to illustrate the hierarchical nature of these files by walking through one way a survey programmer might seek to remove the progress bar from a survey. For a quick, cut and dried how-to for removing the progress bar, see Removing the progress bar.
To remove the progress bar, locate body.tx. Start by looking in the /theme/theme (theme_name) directory. If this file is not present, check the parent theme directory. The parent theme directory is in theme/system. To find out which theme is the parent theme, use the Themes app. If the parent theme also does not have this file, locate the version in that theme's parent, which may be the base theme.
Viewing body.tx reveals that it includes 3 other files, one of which is header.tx:
[% include header; include main; include footer; %]
Given that the base IntelliSurvey theme places the progress bar on top of the page, this is the next place to look. As before, the file may not be present in the theme directory, depending on the theme in use. It might be necessary to look to the current theme's parent, or parent's parent. The contents of header will include a reference to progress:
<div class="header" name="header">[% include progress %]</div>
This line indicates that progress.tx is the file which renders the progress bar.
Copying and editing the file
In order to edit progress.tx, it must be copied into the local theme directory. First, locate it. If there is no version of this file in the current theme's root directory, check the parent theme. If it is not in the parent theme, look in the parent theme's parent. If the file is located in the theme directory, click the Make Local Copy button while the file is selected in the file manager to copy it into the local survey's root theme directory.
The file manager will automatically copy the file into the survey's root theme directory, with the same structure of folders that it had in the parent directory. In this case, the header.tx file is in the root of /system/base, so it is placed in the root of /theme. However, if instead we copied the header.tx file from the system/base/question/closed/hscale directory, the file manager would automatically create the /question/closed/hscale directory structure in the root /theme folder, and put the file there.
If the file to be copied is in the parent theme or higher, it may be necessary to manually create/copy the file.
As our objective is to remove the progress bar, simply remove all contents from the copy progress.tx file n the survey's root /theme directory.
Comments
0 comments
Please sign in to leave a comment.