Not the same but they serve the same purpose.
Two differences -
Couch expects the snippet being embedded to
1. be present within 'couch/snippets' folder (this location is configurable from couch/config.php).
2. contain Couch tags (e.g. <cms:php> instead of <?php)
So, you can make a copy of the head.php and, say, name it head.html and then place it within 'couch/snippets' folder.
Now instead of
To make the snippet properly display the variable, you may modify head.html to make it as follows -
As you can see, there is no need to invoke PHP for displaying any variable - Couch tags will suffice.
Hope this helps.
Two differences -
Couch expects the snippet being embedded to
1. be present within 'couch/snippets' folder (this location is configurable from couch/config.php).
2. contain Couch tags (e.g. <cms:php> instead of <?php)
So, you can make a copy of the head.php and, say, name it head.html and then place it within 'couch/snippets' folder.
Now instead of
- Code: Select all
<cms:set seo_title="<cms:editable name='seo_title' type='text' />" />
<cms:php> $title = '<cms:show seo_title />'; </cms:php>
<?php
require('includes/head.php');
?>
- Code: Select all
<cms:set seo_title="<cms:editable name='seo_title' type='text' />" />
<cms:embed 'head.html' />
To make the snippet properly display the variable, you may modify head.html to make it as follows -
- Code: Select all
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><cms:show seo_title /></title>
As you can see, there is no need to invoke PHP for displaying any variable - Couch tags will suffice.
Hope this helps.