# Core Shortcodes

{% hint style="danger" %}
**Please note:** This page is under construction and has not been finished yet.
{% endhint %}

## Theme shortcodes

| Shortcode             | Description                                                                                                                                                                        |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `{---}`               | Renders the main content of the current page.                                                                                                                                      |
| `{CMENU=xxxxxx}`      | Renders a specific custom menu item as defined in admin -> Pages/Menus. xxxxxx = menu name.                                                                                        |
| `{LOGO}`              | The site's logo as defined in the admin preferences.                                                                                                                               |
| `{MENU=1}`            | Menu Area as allocated using the media-manager in admin. Add multiple areas by incrementing the numeric value.                                                                     |
| `{MENU: type=xxxxxx}` | When `xxxxxx` is NOT a number, it will attempt to render a specific menu with the name `xxxxxx`. eg. `{MENU=contact}` will render `e107_plugins/contact/contact_menu.php`          |
| `{NAVIGATION=xxxxx}`  | Bootstrap-style navigation. Where `xxxxx` is one of: main, side, footer, alt, alt5, alt6 eg. `{NAVIGATION=footer}`                                                                 |
| `{SETSTYLE=xxxxxx}`   | A special shortcode which is used to dynamically change the value of `$style` as used inside [tablerender()](/classes-and-methods/render.md#tablerender) to the value of `xxxxxx`. |
| `{SETIMAGE: w=x}`     | A special shortcode which is used to dynamically change the size of avatars and other images. x= numerical value. eg. `{SETIMAGE: w=100&h=200&crop=1}`                             |
| `{SITEDESCRIPTION}`   | The description of the website as defined in the admin preferences.                                                                                                                |
| `{SITEDISCLAIMER}`    | The site disclaimer as defined in the admin preferences. Typically used in the footer of the site.                                                                                 |
| `{SITENAME}`          | The name of the website as defined in the admin preferences.                                                                                                                       |
| `{WMESSAGE}`          | Renders the welcome message as defined in admin-> Welcome Message.                                                                                                                 |

## Page / Menu Shortcodes

| Shortcode               | Description                   | Optional Parameters                                   |
| ----------------------- | ----------------------------- | ----------------------------------------------------- |
| `{CPAGEANCHOR}`         |                               |                                                       |
| `{CPAGETITLE}`          | Title of the page             |                                                       |
| `{CPAGEBODY}`           | Main text body of the page    |                                                       |
| `{CPAGEAUTHOR}`         | Author of the page            |                                                       |
| `{CPAGEDATE}`           | Creation date of the page     | `{CPAGEDATE=x}` default: long. 'short' and 'relative' |
| `{CPAGEMETADIZ}`        | Meta description of the page. |                                                       |
| `{CPAGEBUTTON}`         |                               |                                                       |
| `{BOOK_ANCHOR}`         |                               |                                                       |
| `{BOOK_DESCRIPTION}`    |                               |                                                       |
| `{BOOK_ICON}`           |                               |                                                       |
| `{BOOK_ID}`             |                               |                                                       |
| `{BOOK_NAME}`           |                               |                                                       |
| `{BOOK_URL}`            |                               |                                                       |
| `{CHAPTER_ANCHOR}`      |                               |                                                       |
| `{CHAPTER_BREADCRUMB}`  |                               |                                                       |
| `{CHAPTER_BUTTON}`      |                               |                                                       |
| `{CHAPTER_DESCRIPTION}` |                               |                                                       |
| `{CHAPTER_ICON}`        |                               |                                                       |
| `{CHAPTER_ID}`          |                               |                                                       |
| `{CHAPTER_NAME}`        |                               |                                                       |
| `{CHAPTER_URL}`         |                               |                                                       |

## News Shortcodes

| Shortcode                     | Description                                                                    | Optional Parameters |                                             |
| ----------------------------- | ------------------------------------------------------------------------------ | ------------------- | ------------------------------------------- |
| `{NEWS_ID}`                   | Unique ID for the current news item (news\_id)                                 |                     |                                             |
| `{NEWS_TITLE}`                | News Title                                                                     |                     |                                             |
| `{NEWS_SUMMARY}`              | News item summary                                                              |                     |                                             |
| `{NEWS_DATE}`                 | News Date                                                                      |                     |                                             |
| `{NEWS_BODY}`                 | News Body (main content)                                                       |                     |                                             |
| `{NEWS_TAGS}`                 | New Keywords/Meta-Keywords                                                     |                     |                                             |
| `{NEWS_URL}`                  | News URL (current URL)                                                         |                     |                                             |
| `{NEWS_AUTHOR}`               | Name of the Author of the news item                                            |                     |                                             |
| `{NEWS_AUTHOR_AVATAR}`        | Avatar of the Author of the news item                                          |                     |                                             |
| `{NEWS_AUTHOR_SIGNATURE}`     | Signature text of the Author of the news item. eg. a short bio about the user. |                     |                                             |
| `{NEWS_AUTHOR_ITEMS_URL}`     | Link to a News page listing all items by the same author.                      |                     |                                             |
|                               |                                                                                |                     |                                             |
| `{NEWS_CATEGORY_NAME}`        | News Category Name                                                             |                     |                                             |
| `{NEWS_CATEGORY_DESCRIPTION}` | News Category Description                                                      |                     |                                             |
| `{NEWS_CATEGORY_ICON}`        | News Category Icon                                                             |                     |                                             |
|                               |                                                                                |                     |                                             |
| `{NEWS_RELATED}`              | Related news items based on keyword matches                                    | <p>types: news      | page<br>limit: (integer) (default is 5)</p> |
|                               |                                                                                |                     |                                             |

## Directory & path Shortcodes

| Shortcode         | Description | Default value |
| ----------------- | ----------- | ------------- |
| `{e_MEDIA_FILE}`  |             |               |
| `{e_MEDIA_VIDEO}` |             |               |
| `{e_MEDIA_IMAGE}` |             |               |

```

				'{e_MEDIA_ICON}',
				'{e_AVATAR}',
				'{e_WEB_JS}',
				'{e_WEB_CSS}',
				'{e_WEB_IMAGE}',
		//		'{e_WEB_PACK}',
				"{e_IMAGE_ABS}",
				"{e_THEME_ABS}",
				"{e_IMAGE}",
				"{e_PLUGIN}",
				"{e_FILE}",
				"{e_THEME}",
				//,"{e_DOWNLOAD}"
				"{e_HANDLER}",
				"{e_MEDIA}",
				"{e_WEB}",
				"{THEME}",
				"{THEME_ABS}",
				"{e_ADMIN}",
				"{e_BASE}",
				"{e_CORE}",
				"{e_SYSTEM}",
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devguide.e107.org/templates-shortcodes-and-constants/core-shortcodes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
