Import and Export Snippets
Tassos Code Snippets lets you export snippets to a file and import them back on the same or a different Joomla installation. This is useful for backing up your snippets, sharing them with other developers, or moving them between staging and production environments.
Exporting Snippets
Follow these steps to export one or more snippets from your site to a .tcs file.
- Log in to your Joomla backend
- Go to Components → Tassos Code Snippets
- In the snippets list, tick the checkbox next to each snippet you want to export, you can select as many as you need in a single export
- Click the Actions dropdown in the toolbar (the button with the ellipsis icon)
- Click Export
- The file downloads automatically to your browser's default download folder
About the Export File
The export file uses the .tcs extension (Tassos Code Snippets). When exporting a single snippet, the file is named after the snippet's title (e.g. My Analytics Script.tcs). When exporting multiple snippets, the file is named with the current date (e.g. snippets-2026-02-20.tcs).
It is a structured JSON file that contains all snippet data, including:
- Title and alias
- Code and code type (HTML, JS, CSS, PHP)
- Insertion method and location
- Publishing rules and parameters
- Category, access level, language, and note
The following fields are intentionally excluded from the export as they are site-specific and would not be meaningful on another installation:
- Internal ID
- Author information (created by, modified by)
- Timestamps (created, modified)
- Ordering
- Checked-out state
Importing Snippets
Follow these steps to import snippets from a .tcs file into your site.
- Log in to your Joomla backend
- Go to Components → Tassos Code Snippets
- Click the Import button in the toolbar of the snippets list
- Click Choose File and select a
.tcsexport file from your computer - Click Upload & Import
What Happens During Import
- Each snippet in the file is created as a new record, regardless of whether a matching snippet already exists — existing snippets are never overwritten
- All imported snippets are set to Unpublished so you can review them before making them live
- If an alias from the import file already exists, a numeric suffix is appended automatically (e.g.
my-snippetbecomesmy-snippet-2). If the snippet uses the shortcode insertion method, the shortcode will reflect the new alias — for example{tcs snippet.my-snippet-2}— So any places in your content where you call the original shortcode will need to be updated accordingly - All other fields — title, code, code type, insertion method, location, publishing rules, parameters, category, access level, language, and note — are restored exactly as they were at the time of export
Troubleshooting
The Export button does nothing
You must select at least one snippet before clicking Export. The button requires a row selection to be active.
Import fails with "Invalid file" error
- Make sure the file has a
.tcsextension - The file must be a valid export produced by Tassos Code Snippets — do not modify the file manually
- The file must not be empty or corrupted
Category is missing after import
Categories are referenced by ID. If the category ID from the source site does not exist on the destination site, the snippet will be placed in the default (uncategorised) category. Assign the correct category manually after import.