Content Elements
Content Elements are individual pieces of content within a Content Group. They can be text or images, and support versioning.
What is a Content Element?
A Content Element is an individual piece of content within a Content Group. Think of it like a field: it has a name (like "headline") and a value (like "Welcome to our site").
Your developer references elements by name when building your site's pages. For example, a "Homepage Hero" group might contain elements named "headline," "subtitle," and "background_image." Because the names need to match what your developer expects, it is best to coordinate on naming when new elements are created.
There are two types of Content Elements:
- Text elements: Hold written content -- anything from a single line like a phone number to a full paragraph with formatting.
- Image elements: Hold a single image, such as a photo, logo, or icon.
Once an element is created as a text or image type, that type cannot be changed. If you need the other type, create a new element.
Text Elements
Text elements hold written content. They are the most common type of Content Element, and you will use them for everything from short headlines to multi-paragraph descriptions.
When editing a text element, you can use the rich text editor for formatted text -- with bold, italic, links, lists, and more -- or enter plain text for simple values like a phone number, email address, or short tagline.
When you edit a text element and save your changes, the updated content appears on your site right away. There is no need for an extra publish step.
Every change you make to a text element is tracked in the version history. If you make a mistake, you can always look back at previous versions and restore one. See Version History below for details.
Image Elements
Image elements hold a single image. Use them for things like a team photo on the About page, a product image in a feature section, a logo, or a background graphic.
To upload an image, drag and drop a file onto the upload area, or click to browse your computer. Once uploaded, you will see a preview of the image so you can confirm it looks right before saving.
If focal points are enabled for your site, you can also mark the most important part of the image. This ensures that when the image is displayed at different sizes or crop ratios, the important part stays visible. See the Focal Points guide for more details.
Version History
Every time you edit and save a text element, RailsPress automatically saves a version of the previous content. This means you always have a complete history of changes -- who changed what, and when.
Version history is useful in several ways:
- Review past changes: See what the content looked like before each edit, so you can track how it has evolved over time.
- Compare versions: Understand exactly what changed between one version and the next.
- Restore a previous version: If you made a mistake or want to go back to an earlier version of the text, you can restore it with a single click. The restored content becomes the current version, and a new version entry is created to record the change.
Version history is tracked for text elements. Each version is numbered sequentially, so you can see the full timeline of edits from the very first version onward.
Required Elements
Some Content Elements may be marked as "required" by your developer. Required elements are protected from accidental deletion -- they cannot be removed from their Content Group.
This is an important safeguard. Imagine your homepage headline is a required element: even if someone accidentally tries to delete it, RailsPress will prevent the deletion. The content that your site depends on stays safe.
You can still edit the content of required elements freely -- you just cannot delete them. If a Content Group contains any required elements, the group itself also cannot be deleted.
If you believe a required element should be removed, talk to your developer. They can change the element's required status if it is no longer needed for your site's layout.