Ok guys...as I said my life spins on your cms (we bought so many licences that i don't even remember lol) that's why your support is always the best, the quickest and the kindest.
Now i have a problem:
I have a website that takes content from a page called data.php with the following structure:
the code in the index.html is pretty easy
Now...I would like to take the file data.php and make the content areas editable by couch so the clients can edit their own pages...
Even under one template "data.php" and every page is an editable region if this is the way...
please tell me that is possible.
Thanks heaps like usually
Best
Now i have a problem:
I have a website that takes content from a page called data.php with the following structure:
- Code: Select all
<?php
$hash_frag = $_GET['_escaped_fragment_'];
$content = array(
"page-1" => 'content page 1',
"page-2" => 'content page 2',
...
"page-n" => 'content page n'
);
if(isset($hash_frag)) {
echo $content[$hash_frag];
}
?>
the code in the index.html is pretty easy
- Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
var escapedHash;
function findHash() {
if(window.location.hash) {
//$("#content").html("Loading...");
escapedHash = window.location.hash.replace("#!", "");
//alert(escapedHash);
$.get("data.php?_escaped_fragment_=" + escapedHash, function(data) {
$("#content").html(data);
});
}
}
$(document).ready(function() {
findHash();
});
$(window).bind('hashchange', function() {
findHash();
});
</script>
</head>
<body>
<ul id="nav">
<li><a href="#!page-1">Page-1</a></li>
<li><a href="#!page-2">Page-2</a></li>
...
<li><a href="#!page-n">Page-n</a></li>
</ul>
<div id="content"></div>
</body>
</html>
Now...I would like to take the file data.php and make the content areas editable by couch so the clients can edit their own pages...
Even under one template "data.php" and every page is an editable region if this is the way...
please tell me that is possible.
Thanks heaps like usually
Best