On this page
Creating a back-to-top link with Flexifilter
Last updated on
30 April 2025
Because Flexifilter allows for appending, you can create a back-to-top link through Flexifilter. Let's try it.
Creating a Back To Top Link
- Go to the flexifilter administration area by clicking Administer -> Site Building -> Flexifilters, and click 'Add new flexifilter'.
- Set the Label to: 'Back to Top'.
- Set the Description to: 'Adds a back to top link if a post is higher than 1000 characters.'.
- Under the add component menu, select an If component, and click 'Add'.
- Under the new If component, find the change condition selection menu, select 'Text length is...' and click 'Change'.
- Under the operator of the text length component, select 'Is more than or equal to'.
- Set the 'Length in character count' field to 1000.
- Click 'Change' to save.
- Under the new if component, there is a separate add component menu, select 'Simple Text Append', and click 'Add'.
- Set the Text to Append to:
<a href="#">Back to top</a> - Click 'Create' at the bottom.
- Go to
example.com/admin/settings/filters. - Next to the input format you are using, click 'Configure'. If you are using more than one input format, or you aren't sure which input format you are using, repeat this and the next few steps for each input format.
- Under the 'Filters' section, click the checkbox next to our newly-created 'Back to Top' filter, and click 'Save configuration' at the bottom.
- Test out some content, and enjoy!
Code Export
You can download the simple export for this code here.
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion