---
title: "Add a View as Markdown Link to Joomla Articles - Code Snippets"
description: "Give readers and AI tools a one-click plain-text version of every Joomla article by linking to its Markdown copy, using one HTML snippet."
url: "https://www.tassos.gr/docs/code-snippets/howto/content-enhancement/view-as-markdown-link"
date: "2026-10-22T22:25:50+00:00"
language: "en-GB"
---

[ Home ](https://www.tassos.gr/docs) / [ Code Snippets ](https://www.tassos.gr/docs/code-snippets) / [ How-to Guides ](https://www.tassos.gr/docs/code-snippets/howto) / [ Content Enhancement ](https://www.tassos.gr/docs/code-snippets/howto/content-enhancement)

#  Add a View as Markdown Link to Joomla Articles

##  Give readers and AI tools a one-click plain-text version of every Joomla article by linking to its Markdown copy, using one HTML snippet.

 ![Add a View as Markdown Link to Joomla Articles](https://www.tassos.gr/images/2026/10/code-snippets-view-as-markdown-link-html-card.png) Heads up! This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.

Readers paste your articles into ChatGPT, save them to note apps or feed them to their own tools, and the HTML page carries menus, scripts and markup they don't want. Google Structured Data can serve a clean Markdown copy of every page. A link at the end of each article tells readers it exists. You can add a "View as Markdown" link to Joomla articles with one HTML snippet in Code Snippets.

## [Before you start](#before-you-start)

The link points to the Markdown version that [Google Structured Data](https://www.tassos.gr/google-structured-data) serves at the article's own address plus `.md`. The feature is part of Google Structured Data Pro. Install the extension and turn it on as [Convert HTML to Markdown](https://www.tassos.gr/docs/google-structured-data/functionality/html-to-markdown) describes. Your site also needs Search Engine Friendly URLs, which are on by default in Joomla.

On the Code Snippets side you need version 1.0.2 or later, and the [Pro edition](https://www.tassos.gr/code-snippets) for the article location and the PHP condition used below.

## [How to add this snippet](#how-to-add-this-snippet)

1. Install [Code Snippets](https://www.tassos.gr/docs/code-snippets/getting-started/how-to-install) if it isn't installed already.
2. Log into your Joomla backend.
3. Go to **Components** → **Tassos Code Snippets**.
4. Click **New**.
5. Enter a title, for example *View as Markdown link*.
6. Set **Code Type** to **HTML**.
7. Set **Insertion Method** to **Auto-Insert Locations**.
8. Set **Location** to **After Article Content**.
9. Paste this code into the editor. The `{tcs article.link}` smart tag is replaced with the address of the article being shown, and `.md` goes right after it. To change the link text, edit *View as Markdown*:

    ```
    <p class="tcs-markdown-link"><a href='{tcs article.link}.md'>View as Markdown</a></p>
    ```
10. Open the **Conditional Logic** tab. The condition keeps the link off while the Markdown feature is off or Google Structured Data is disabled, so there's never a dead link:

    - Set **Display on** to **Selected Pages**.
    - Click **New Condition Set**.
    - Click **Select Condition** and choose **PHP**.
    - Paste this code into the condition's editor:

        ```
        $helper = '\Joomla\CMS\Component\ComponentHelper';

        return $helper::isEnabled('com_gsd')
            && $helper::getParams('com_gsd')->get('markdown_enabled');
        ```
11. Click **Save & Close**.

## [Check that it works](#check-that-it-works)

1. Open any article on your site and scroll to the end of the text.
2. Click **View as Markdown**.

The browser shows the article as plain Markdown text, starting with the title as a heading. The address in the bar is the article's address with `.md` at the end. Blog and featured pages don't get the link, only single article pages.

 Write the condition with full class names, as above. A use statement in the condition's code makes the condition fail, and the snippet never shows.

To show the article's last modified date in the same spot, see [Display the Last Modified Date in Joomla Articles](https://www.tassos.gr/docs/code-snippets/howto/content-enhancement/last-modified-date). To learn more about HTML snippets, read the [HTML snippet docs](https://www.tassos.gr/docs/code-snippets/types/html).

 Last updated on Oct 15th 2026 18:10
