Kind of have an interesting scenario here where I'm trying to manage multiple front-end templates from a single install of CouchCMS. Reason being, I want to be able to push updates to a single git repo and be able to update all templates from a single instance.
To do this, I'm currently doing the following:
index.php
/couch/snippets/template_1/default.php
My custom.php file is suppose to be a couch managed CSS file where I can update some css via the admin. However, placing the files in the snippets folder breaks functionality of the custom.php file as well as doesn't render styles.css file. I assume because of the .htaccess permissions for the snippets folder which is denying access.
Ultimately my goal is to be able to have template_2, template_3, etc all managed from the snippets folder, and to control which template renders on the front-end, I would just change the value of <cms:smart_embed "template_x" /> in my main index.php file.
Is there a proper / possible way of achieving this? Hopefully that all makes sense, thanks!
To do this, I'm currently doing the following:
index.php
- Code: Select all
<?php require_once('couch/cms.php'); ?>
<!-- Template ID -->
<cms:smart_embed "template_1" />
<?php COUCH::invoke(); ?>
/couch/snippets/template_1/default.php
- Code: Select all
<!-- Editable Fields -->
<cms:embed 'template_1/editables.php' /> // stores all of my editable fields
<!doctype html>
<html lang="en">
<head>
...
<!-- Stylesheets -->
<link rel="stylesheet" href="<cms:show k_admin_link />snippets/template_1/css/styles.css" type="text/css">
<link rel="stylesheet" href="<cms:show k_admin_link />snippets/template_1/css/custom.php" type="text/css">
...
</head>
<body>
...
</body>
</html>
My custom.php file is suppose to be a couch managed CSS file where I can update some css via the admin. However, placing the files in the snippets folder breaks functionality of the custom.php file as well as doesn't render styles.css file. I assume because of the .htaccess permissions for the snippets folder which is denying access.
Ultimately my goal is to be able to have template_2, template_3, etc all managed from the snippets folder, and to control which template renders on the front-end, I would just change the value of <cms:smart_embed "template_x" /> in my main index.php file.
Is there a proper / possible way of achieving this? Hopefully that all makes sense, thanks!