### Installing Aurelius Template
Source: https://github.com/couchcms/documentation/blob/gh-pages/tutorials/portfolio-site/building-a-real-world-site.html
Steps to set up the Aurelius static site before integrating CouchCMS. This includes unzipping files, uploading to a server, and optional local development setup using XAMPP or WampServer. It also details removing unnecessary files from the original template.
```text
Unzip and upload all the files of Aurelius to your web server.
If you are using the files downloaded from _[http://net.tutsplus.com/](http://net.tutsplus.com/)_, remove the _Documentation_ and _psd_ folders as well as the _config.php_, _send_email.php_ and _full_width.html_ files as these will no longer be needed by us (this won't be necessary if you downloaded the template from our site).
The resulting folder structure should look like this -

Confirm that all the pages of this template are now accessible through the browser. With the website in place, we can now move on to install Couch within it.
```
--------------------------------
### Shortcode Examples
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/miscellaneous/shortcodes.md
Examples of shortcodes that can be inserted into content for dynamic content generation.
```html
[adsense]
[youtube video="1aBSPn2P9bg" /]
[mailto]johndoe@nowhere.com[/mailto]
```
--------------------------------
### Shortcode Examples
Source: https://github.com/couchcms/documentation/blob/gh-pages/miscellaneous/shortcodes.html
Illustrates the syntax of different types of shortcodes that can be used within CouchCMS content.
```html
[adsense]
[youtube video="1aBSPn2P9bg" /]
[mailto]johndoe@nowhere.com[/mailto]
```
--------------------------------
### Shortcode Usage Examples
Source: https://github.com/couchcms/documentation/blob/gh-pages/miscellaneous/shortcodes.html
Examples illustrating how shortcodes are used in content and the resulting output after processing. This includes self-enclosing shortcodes, shortcodes with enclosed content, and nested shortcodes.
```couchcms
[hello]
Hello from a shortcode!
[hello]What's up?[/hello]
[b]World[/b]
Hello World
[i]Hello[/i] [b]World[/b]
HelloWorld
[u][i]hello[/i] [b]world[/b][/u]
helloworld
[some_shortcode foo="hello" bar='world' baz=hi ]
[some_shortcode "hello" 'world' hi ]
```
--------------------------------
### Full Google Map Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/tags-reference/google_map.html
A comprehensive example demonstrating various parameters for the google_map tag, including name, coordinates, zoom, message, dimensions, and custom styles.
```couchcms
```
--------------------------------
### Full Google Map Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/tags-reference/google_map.md
A comprehensive example demonstrating all available parameters for the google_map tag, including name, coordinates, zoom level, custom message, dimensions, and styling.
```html
```
--------------------------------
### Shortcode with Parameters (Syntax Examples)
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/miscellaneous/shortcodes.md
Illustrates the syntax for passing parameters to shortcodes, including named parameters with different quote styles and unnamed parameters.
```couchcms
[some_shortcode foo="hello" bar='world' baz=hi ]
```
```couchcms
[some_shortcode "hello" 'world' hi ]
```
--------------------------------
### PayPal IPN Log Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/concepts/paypal.html
This is an example of the log file content generated by the paypal_processor tag when debug is enabled. It shows the received IPN data, the verification process with PayPal, and the final transaction validation status.
```text
=======================[25-Jul-2010 10:08:22 PM]=======================
Received paypal IPN:
mc_gross = 13.68
protection_eligibility = Ineligible
payer_id = 38UYXKJAJW7VJ
tax = 0.00
payment_date = 22:08:18 Jul 25, 2010 PDT
payment_status = Completed
charset = windows-1252
first_name = Test
mc_fee = 0.70
notify_version = 3.0
custom =
payer_status = verified
business = seller_3272492192_biz@gmail.com
quantity = 3
verify_sign = AFcWxV21C7fd0v3bYYYRCpSSRl31AmmFHoB9fY1YRiGSb9s-pX-wTi.c
payer_email = buyer_3272492155_per@gmail.com
txn_id = 8HA76708L29474809
payment_type = instant
last_name = User
receiver_email = seller_3272492192_biz@gmail.com
payment_fee = 0.70
receiver_id = H2D8CMM9EY86G
txn_type = web_accept
item_name = My First Product
mc_currency = USD
item_number = 1
residence_country = US
test_ipn = 1
handling_amount = 0.00
transaction_subject = My First Product
payment_gross = 13.68
shipping = 0.00
=======================[25-Jul-2010 10:08:23 PM]=======================
Connecting to paypal for verification..
=======================[25-Jul-2010 10:08:23 PM]=======================
Connected
=======================[25-Jul-2010 10:08:23 PM]=======================
VERIFIED
=======================[25-Jul-2010 10:08:23 PM]=======================
Couch validating transaction..
=======================[25-Jul-2010 10:08:23 PM]=======================
Transaction OK
=======================[25-Jul-2010 10:08:23 PM]=======================
Exiting
```
--------------------------------
### CouchCMS 'show' Tag Comparison
Source: https://github.com/couchcms/documentation/blob/gh-pages/tags-reference/get.html
Illustrates the difference between the 'get' and 'show' tags in CouchCMS. The 'show' tag outputs the literal parameter value, while 'get' outputs the variable's content.
```html
```
```html
```
--------------------------------
### URL Examples for Clonable Templates
Source: https://github.com/couchcms/documentation/blob/gh-pages/concepts/cloned-pages.html
Demonstrates the URL structures for accessing a clonable template and its cloned pages, both with and without pretty URLs.
```html
Accessing the original template:
http://www.yoursite.com/blog.php
Accessing a cloned page (with query parameter):
http://www.yoursite.com/blog.php?p=12
Accessing a cloned page (with pretty URLs):
http://www.yoursite.com/blog/my-first-page.html
```
--------------------------------
### Example SEO Friendly URL Structure
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/concepts/using-folders.md
Demonstrates how a page's URL in CouchCMS reflects its folder hierarchy, enhancing SEO friendliness. The example shows a page located in the Nevada News folder.
```html
http://www.yoursite.com/news/world/north-america/united-states/nevada/a-hot-news.html
```
--------------------------------
### Start-Tag/End-Tag Pair Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/concepts/tags.md
Illustrates the structure of a paired tag in Couch CMS, which encloses content to be processed by the tag.
```couchcms
This heading will be repeated 4 times
```
--------------------------------
### PayPal IPN Log Entry Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/concepts/paypal.md
This is an example of the content found within the log file generated by the paypal_processor tag during a successful transaction. It includes details received from PayPal, verification status, and internal processing messages.
```text
=======================[25-Jul-2010 10:08:22 PM]=======================
Received paypal IPN:
mc_gross = 13.68
protection_eligibility = Ineligible
payer_id = 38UYXKJAJW7VJ
tax = 0.00
payment_date = 22:08:18 Jul 25, 2010 PDT
payment_status = Completed
charset = windows-1252
first_name = Test
mc_fee = 0.70
notify_version = 3.0
custom =
payer_status = verified
business = seller_3272492192_biz@gmail.com
quantity = 3
verify_sign = AFcWxV21C7fd0v3bYYYRCpSSRl31AmmFHoB9fY1YRiGSb9s-pX-wTi.c
payer_email = buyer_3272492155_per@gmail.com
txn_id = 8HA76708L29474809
payment_type = instant
last_name = User
receiver_email = seller_3272492192_biz@gmail.com
payment_fee = 0.70
receiver_id = H2D8CMM9EY86G
txn_type = web_accept
item_name = My First Product
mc_currency = USD
item_number = 1
residence_country = US
test_ipn = 1
handling_amount = 0.00
transaction_subject = My First Product
payment_gross = 13.68
shipping = 0.00
=======================[25-Jul-2010 10:08:23 PM]=======================
Connecting to paypal for verification..
=======================[25-Jul-2010 10:08:23 PM]=======================
Connected
=======================[25-Jul-2010 10:08:23 PM]=======================
VERIFIED
=======================[25-Jul-2010 10:08:23 PM]=======================
Couch validating transaction..
=======================[25-Jul-2010 10:08:23 PM]=======================
Transaction OK
=======================[25-Jul-2010 10:08:23 PM]=======================
Exiting
```
--------------------------------
### Static Folder Structure Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/miscellaneous/dynamic-folders.md
Demonstrates the traditional method of creating a fixed folder hierarchy using the 'folder' tag in CouchCMS templates.
```couchcms
```
--------------------------------
### CouchCMS Pagination Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/concepts/pagination.md
Demonstrates the usage of the 'pages' tag with the 'limit' and 'paginate' attributes to enable pagination. This snippet serves as a basis for understanding the pagination variables.
```html
```
--------------------------------
### Static Folder Tag Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/miscellaneous/dynamic-folders.html
Demonstrates the traditional method of defining a fixed folder hierarchy using the 'folder' tag in CouchCMS templates.
```couchcms
```
--------------------------------
### Generating a Basic Menu
Source: https://github.com/couchcms/documentation/blob/gh-pages/tags-reference/menu.html
Example of using the 'menu' tag to generate a navigation menu. It assumes a 'menu.php' masterpage and displays pages up to a specified depth.
```PHP
```
--------------------------------
### Discount by Quantity Ordered
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/concepts/shopping-cart-2.md
Sets up a discount based on the number of items in the cart. Example: Get $10 off the order if more than 4 items are purchased.
```php
$pp['discount_by_quantity_ordered'] = '[ 4=10 ]';
```
--------------------------------
### Basic paypal_processor Setup
Source: https://github.com/couchcms/documentation/blob/gh-pages/concepts/paypal.html
This snippet shows the basic implementation of the paypal_processor tag in a product template. It enables debugging to log the IPN processing steps.
```html
```
--------------------------------
### CouchCMS Editable Regions Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/tags-reference/editable/group.md
Demonstrates the initial setup of various editable regions in CouchCMS, including image, thumbnail, text, and file types, before grouping.
```html
```
--------------------------------
### PHP Configuration Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/tutorials/portfolio-site/building-a-real-world-site.html
This snippet shows the relevant lines in the `config.php` file that need to be modified to connect to your MySQL database. Ensure the database name, username, and password are correct.
```php
define('DB_NAME', 'your_database_name');
define('DB_USER', 'your_database_username');
define('DB_PASSWORD', 'your_database_password');
```
--------------------------------
### CouchCMS Pagination Setup
Source: https://github.com/couchcms/documentation/blob/gh-pages/tutorials/portfolio-site/blog-2.html
Demonstrates how to set up pagination by limiting the number of fetched pages and enabling pagination support. This involves adding 'limit' and 'paginate' parameters to the pages tag.
```CouchCMS
...
```
--------------------------------
### CouchCMS get Tag Usage
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/tags-reference/get.md
Demonstrates the basic usage of the 'get' tag to retrieve and display the value of a variable previously set. It highlights the difference between 'get' and 'show' tags.
```couchcms
```
```couchcms
```
```couchcms
```
```couchcms
```
--------------------------------
### CouchCMS 'get' Tag Parameters
Source: https://github.com/couchcms/documentation/blob/gh-pages/tags-reference/get.html
Details the parameters for the CouchCMS 'get' tag, including 'var' for the variable name and 'local_only' to restrict the search scope.
```APIDOC
get
Parameters:
var: Name of the variable the value of which is to be output.
local_only: If this parameter is set to '1', 'get' will search for the variable only in the local scope.
```
--------------------------------
### CouchCMS get Tag Parameters
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/tags-reference/get.md
Details the parameters for the CouchCMS 'get' tag, including 'var' for the variable name and 'local_only' to restrict the search scope.
```APIDOC
get:
description: Outputs the value of a variable by its name.
parameters:
var: Name of the variable whose value is to be output.
local_only: If set to '1', 'get' will search for the variable only in the local scope.
related_tags:
- show
- set
- get_custom_field
- pages
```
--------------------------------
### Database Configuration
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/tutorials/portfolio-site/building-a-real-world-site.md
This snippet shows how to configure the database connection by renaming and editing the `config.example.php` file. It involves updating MySQL database credentials.
```php
```
--------------------------------
### CouchCMS 'get' Tag Usage
Source: https://github.com/couchcms/documentation/blob/gh-pages/tags-reference/get.html
Demonstrates how to use the 'get' tag to output the value of a variable. It shows the correct usage with quotes around the variable name parameter.
```html
```
--------------------------------
### Basic Tag Nesting Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/concepts/setting-parameters.html
Demonstrates a simple case of nesting CouchCMS tags, showing how to evaluate innermost tags first to understand the final output.
```couchcms
\" /> world" />
```
--------------------------------
### CouchCMS 'get' Tag Incorrect Usage
Source: https://github.com/couchcms/documentation/blob/gh-pages/tags-reference/get.html
Shows an incorrect usage of the 'get' tag in CouchCMS where quotes are omitted, leading to an attempt to fetch a variable by a literal value instead of its name.
```html
```
--------------------------------
### CouchCMS Initialization Code
Source: https://github.com/couchcms/documentation/blob/gh-pages/tutorials/portfolio-site/about-us.html
This snippet shows the two essential PHP lines required to integrate CouchCMS into an HTML template. The first line includes the CouchCMS core, and the second invokes the framework to process the template. Ensure the path to 'couch/cms.php' is correct, especially if the admin folder has been renamed.
```php
```
```php
```
--------------------------------
### Example Usage of Google Maps Shortcode
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/miscellaneous/shortcodes.md
Demonstrates various ways a user can implement the registered 'googlemap' shortcode with different combinations of src, width, and height parameters.
```php
[googlemap src="http://maps.google.com/?ll=23.250652,77.402072&spn=0.019912,0.038581&z=15"]
[googlemap src="http://maps.google.com/?ll=23.250652,77.402072&spn=0.019912,0.038581&z=15" width='600']
[googlemap src="http://maps.google.com/?ll=23.250652,77.402072&spn=0.019912,0.038581&z=15" width='600' height='480']
```
--------------------------------
### Displaying Literal String with Show Tag
Source: https://github.com/couchcms/documentation/blob/gh-pages/tags-reference/show.html
This snippet demonstrates the basic usage of the 'show' tag to display a static string 'Hello World' on the page. It requires no external dependencies and directly outputs the provided text.
```html
```
--------------------------------
### Customize Start Count for Pagination Variables
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/tags-reference/pages.md
Allows customization of the starting number for pagination-related variables like k_count.
```couchcms
```
--------------------------------
### CouchCMS Related Tags
Source: https://github.com/couchcms/documentation/blob/gh-pages/tags-reference/get.html
Lists related tags to the 'get' tag in CouchCMS, providing context for variable manipulation and data retrieval.
```APIDOC
Related Tags:
show
set
get_custom_field
pages
```
--------------------------------
### CouchCMS Data Migration Utility
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/miscellaneous/migrating-from-development-to-deployment-server.md
The 'gen_dump.php' utility, located in the 'couch' folder, creates a data dump ('install_ex.php') of a local CouchCMS site. This file is then used during the installation process on the deployment server to recreate the local data, simplifying the migration process.
```php
```
--------------------------------
### Contact Form Setup
Source: https://github.com/couchcms/documentation/blob/gh-pages/tutorials/portfolio-site/contact-form.html
Instructions for setting up the contact form. This involves changing the file extension from .html to .php, adding boilerplate PHP code, and using CouchCMS template tags.
```html
contact.html
```
```php
*/
?>
```
--------------------------------
### Simple Custom Toolbar Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/tags-reference/editable/richtext.html
This example demonstrates a basic custom toolbar with only the 'bold' and 'italic' buttons enabled for a richtext field.
```html
```
--------------------------------
### Editable Tag - Search Type Parameter Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/tags-reference/editable.md
Provides an example of setting the 'search_type' parameter to 'decimal' for an editable region, influencing sorting and comparison of its values.
```html
search_type='decimal'
```
--------------------------------
### CouchCMS Blog Template Setup
Source: https://github.com/couchcms/documentation/blob/gh-pages/tutorials/portfolio-site/blog.html
This snippet demonstrates the file renaming process to set up the blog section in CouchCMS. It involves renaming 'blog.html' to 'blog_list.html' and 'single.html' to 'blog.html' to prepare for defining editable regions and displaying blog content.
```bash
mv blog.html blog_list.html
mv single.html blog.html
```
--------------------------------
### CouchCMS Data Migration Utility
Source: https://github.com/couchcms/documentation/blob/gh-pages/miscellaneous/migrating-from-development-to-deployment-server.html
This section describes the 'gen_dump.php' utility provided with CouchCMS 1.1. This script creates a data dump file ('install_ex.php') from a local development environment, which can then be used during the CouchCMS installation on the deployment server to recreate the site's data. It's a crucial step for migrating content and configurations.
```php
// Example of the generated install_ex.php content (simplified):
[
// ... page data ...
],
'settings' => [
// ... settings data ...
]
];
// The installation routine will parse this data to recreate the site.
?>
```
--------------------------------
### CouchCMS Template Setup
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/tutorials/portfolio-site/tying-the-loose-ends.md
Basic PHP code required to initialize CouchCMS within a template file. This includes setting up the Couch instance and defining the template's properties.
```couchcms
```
--------------------------------
### CouchCMS Ignore Tag Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/tags-reference/ignore.html
Demonstrates the usage of the 'ignore' tag in CouchCMS to prevent specific code sections from executing. The example shows that content within the 'ignore' tags is not processed or displayed.
```html
```
--------------------------------
### Complex Custom Toolbar Example (Mimicking 'medium')
Source: https://github.com/couchcms/documentation/blob/gh-pages/tags-reference/editable/richtext.html
This example shows a more comprehensive custom toolbar configuration, replicating the functionality of a 'medium' toolbar. It includes separators, button grouping, and row breaks.
```html
```
--------------------------------
### Local Testing Packages
Source: https://github.com/couchcms/documentation/blob/gh-pages/requirements.html
Lists recommended packages for setting up a local development environment to test CouchCMS. These packages bundle Apache, MySQL, and PHP for easier installation and configuration.
```APIDOC
Local Testing Packages:
XAMPP: Multi-platform (Apache, MySQL, PHP)
WampServer: Windows platform (Apache, MySQL, PHP)
Manual Installation: Apache, MySQL, PHP configured separately
```
--------------------------------
### Download Gallery Templates
Source: https://github.com/couchcms/documentation/blob/gh-pages/concepts/photo-gallery.html
Provides links to download the standard and Slimbox versions of the CouchCMS photo gallery template.
```HTML
Download the Slimbox version here: gallery_using_slimbox.zip (this is another version of the same template using JavaScript (Slimbox) to display the images).
```
--------------------------------
### CouchCMS related_pages with pages Tag Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/concepts/relationships.md
Shows how to use related_pages in conjunction with the pages tag to fetch related content for a specific page when not in a direct page-view context. This example retrieves albums for a specific artist ('john-lennon').
```php
\n
Albums of John Lennon:
\n \n \n \n
```
--------------------------------
### CouchCMS Pagination Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/concepts/pagination.html
Demonstrates how to use the 'paginate' attribute with CouchCMS tags like 'pages' to enable pagination. This snippet shows the basic structure for fetching and iterating through paginated content.
```CouchCMS
```
--------------------------------
### CouchCMS Custom 404 Template Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/concepts/custom-404-page.md
This is an example of how to structure your custom 404 page template in CouchCMS. It demonstrates how to use CouchCMS tags to ensure that all links and image sources are absolute, preventing broken assets.
```php
```
--------------------------------
### PayPal IPN Overview
Source: https://github.com/couchcms/documentation/blob/gh-pages/concepts/paypal.html
Explains the standard PayPal Instant Payment Notification (IPN) process for online sales, detailing the steps from button click to product delivery.
```english
1. The process starts by placing a specially coded 'Buy Now' button for each item on the website. The code of each button has to be given data about the item associated with it i.e. the product's name, id, price etc.
2. Clicking on a button takes the visitor to PayPal's website where, after adjusting the number of units he is buying, he makes the payment.
3. PayPal immediately intimates the seller about the payment using IPN (Instant Payment Notification). IPN contains all the relevant data about the transaction, i.e. the item that was paid for, the number of units bought, the payment amount, the buyer's email etc. To receive PayPal's IPN, the seller needs to place a specially coded script on his website that can decipher the incoming IPN and take necessary actions. The URL (address) of this script has to be provided beforehand to PayPal (normally this is placed in the button code mentioned in the first step above).
4. Once the script receives the IPN, it is supposed to first of all verify that the IPN is arriving genuinely from PayPal and has not been spoofed by someone. Once this is verified, the script then goes on to validate the details of the transaction being reported - if the correct amount has been paid for the item sold, the amount has been deposited in the right account etc.
5. Once everything checks out fine, it is now that the product is finally delivered to the buyer. This could be done by using the email.
```
--------------------------------
### Fetch GET, POST, or COOKIE Variable using gpc Tag
Source: https://github.com/couchcms/documentation/blob/gh-pages/tags-reference/gpc.html
The gpc tag retrieves values from GET, POST, or COOKIE variables. It sanitizes the input to prevent XSS attacks. If no method is specified, it searches all three sources.
```couchcms
```
```couchcms
```
--------------------------------
### Custom 404 Page Template Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/concepts/custom-404-page.html
This snippet shows a basic structure for a custom 404 error page template in PHP for CouchCMS. It includes an example of how to use the `k_site_link` variable to ensure absolute paths for assets.
```php
Page Not Found
404 - Page Not Found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
```
--------------------------------
### Extreme Tag Nesting Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/concepts/setting-parameters.md
Demonstrates a deeply nested CouchCMS tag structure to illustrate how tag outputs can be used as parameters for other tags, emphasizing a step-by-step evaluation from the innermost tag.
```couchcms
\" /> world" />
```
--------------------------------
### Troubleshooting 500 Internal Server Error
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/tutorials/portfolio-site/building-a-real-world-site.md
If a '500 Internal Server Error' occurs during installation, it might be due to the `.htaccess` file. This note advises on deleting the `.htaccess` file in the 'couch' installation folder to resolve the issue, particularly on hosts like GoDaddy.
```apache
# Remove this file if you encounter a 500 Internal Server Error during installation.
# .htaccess
```
--------------------------------
### CouchCMS Search URL Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/concepts/using-search.html
This example shows how to trigger a search in CouchCMS by passing search terms through the URL's query string. The _search_ tag is configured to look for a parameter named 's'. Visiting the specified URL with 'hello' and 'world' as search terms will initiate the search.
```HTML
http://www.yoursite.com/search.php?s=hello+world
```
--------------------------------
### CouchCMS Form Validation Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/tutorials/portfolio-site/contact-form.html
This snippet demonstrates how to add validation constraints to input tags in CouchCMS. It shows the use of '_required' for mandatory fields and '_validator' for specific formats like email. The example also illustrates how to conditionally display error messages based on the 'k_error_tagname' variables set by CouchCMS upon validation failure.
```CouchCMS
Please correct the following errors:
Name is required.A valid email is required.Message is required.
```
--------------------------------
### Registering a Simple Shortcode
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/miscellaneous/shortcodes.md
Defines a 'hello' shortcode and its handler function in PHP, which returns a simple H1 tag.
```php
$FUNCS->register_shortcode( 'hello', 'hello_handler' );
function hello_handler( $params, $content=null ){
return '
Hello from a shortcode!
';
}
```
--------------------------------
### Display Selected Product Options
Source: https://github.com/couchcms/documentation/blob/gh-pages/concepts/shopping-cart-1.html
This snippet shows two ways to use the CouchCMS _pp_selected_options tag to display product variants or options. The first example uses it as a self-closing tag with a 'separator' parameter to list options on a single line. The second example uses it as a tag-pair to iterate through each option, allowing for custom formatting of option name and value.
```couchcms
. :
```
--------------------------------
### Aurelius Template Structure
Source: https://github.com/couchcms/documentation/blob/gh-pages/src/contents/tutorials/portfolio-site/building-a-real-world-site.md
This snippet shows the expected folder structure after preparing the Aurelius template for CouchCMS integration. It highlights the removal of unnecessary files and folders.
```directory
├── css
├── fonts
├── img
├── js
├── index.html
├── about.html
├── portfolio.html
├── blog.html
├── contact.html
```
--------------------------------
### Displaying Product Options with CouchCart
Source: https://github.com/couchcms/documentation/blob/gh-pages/concepts/shopping-cart-1.html
Demonstrates how to use the pp_product_options and pp_option_values tags to list and display product options, such as size or color, in a template. It shows how pp_option_values can automatically generate HTML for dropdowns or radio buttons based on configuration.
```couchcms
>
[]
:
```
--------------------------------
### Self-Closing Couch Tag Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/concepts/tags.html
Demonstrates the syntax of a self-closing tag in CouchCMS, used for simple output operations.
```couchcms
```
--------------------------------
### Paired Couch Tag Example
Source: https://github.com/couchcms/documentation/blob/gh-pages/concepts/tags.html
Illustrates the structure of a paired tag in CouchCMS, which encloses content to be processed or repeated.
```couchcms