• Share a link to this article:

Editing text strings and labels

Most ThemeFlood RapidWeaver themes contain labels or other text strings. Typically these are elements of text which have been preset via the theme index.html file. Elements like the 'Navigation Menu' title applied to toggle navigation layouts and 'Page last updated' in the footer fall into this category of theme labels. Some themes have more preset text strings than others, depending on the functionality of the theme.

Editing text

Because RapidWeaver does not support text inputs for theme style settings, these text strings have needed to be set via the theme index.html file. You cannot easily change these sorts of text strings to read as something else through the theme style settings. Instead if you want to change the text or language of these strings, you will need to edit the theme index.html file, to include your changes. Commonly you can change the text strings for the following things:

  • 'Back to top' links
  • 'Last updated' and 'last published' stamps
  • 'Currently viewing' breadcrumb links
  • The 'Menu' title shown on the mobile toggle navigation menu
  • Placeholder text shown in elements like search forms

Firstly before you starting modifying the theme, it's recommended that you have duplicated and renamed the theme (if you've not done so already) to something else; and this action will stop future theme updates from undoing your changes. See the theme management article if you're not sure how to do this.

The next stage is to open the theme contents. Inside the theme contents, you should open the theme index.html file in your preferred code editor (like TextWranger, Coda or Espresso). In your code editor, perform a search for the text string you are seeking to change. Most text editors have a search function that can be located in the Edit menu or using the CMD + F keyboard shortcut. This will reveal a search dialogue box, like the one pictured below.

Editing text

At this point, you can find and replace the theme text string with your own text string. For example, you may wish to change the label text applied to read as something else or translate existing text strings into another language. Once done, save the changes to the index.html file and close the code editor. At this point, your changes should take immediate effect in RapidWeaver. The next time you export or publish your website, these same changes will be transferred over to the web server.