Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi, I added these tags into two pages. But in admin I can see just the one which is currently opened in my browser. For the second one there is a note: "Field not found!".
Code: Select all
<?php require_once( 'couch/cms.php' ); ?>   
<cms:editable name='publikace' type='richtext'/>
<?php COUCH::invoke(); ?>

Does someone know where the mistake is?
Also I have my index.php designed like this. Is it possible that the problem is related with the dynamic content infilling?
Thanks!
Code: Select all
 <ul>
        <li><a href="index.php?stranka=omne">O mně</a></li>
        <li><a href="index.php?stranka=publikacnicinnost">Publikační činnost</a></li>
        <li><a href="index.php?stranka=fotogalerie">Fotogalerie</a></li>
        <li><a href="index.php?stranka=kontakt">Kontakt</a></li>
    </ul>

    <!-- článek -->
    <article>
        <?php
            if (isset($_GET['stranka']))
                $stranka = $_GET['stranka'];
            else
                $stranka = 'omne';
            if (preg_match('/^[a-z0-9]+$/', $stranka))
            {
                $vlozeno = include('podstranky/' . $stranka . '.php');
                if (!$vlozeno)
                    echo('Podstránka nenalezena');
            }
            else
                echo('Neplatný parametr.');
        ?>

    </article>
Hi,

Couch is meant to be retrofitted into only static designs (i.e. HTML/CSS/JS).
Trying to use it with existing PHP will lead to the kind of problems you are experiencing.

Please try to refactor your design to do away with the PHP it is using (as you can usually accomplish that functionality with Couch alone).
Hi luca

Code: Select all
<?php require_once( 'couch/cms.php' ); ?>   
<cms:editable name='publikace' type='richtext'/>
<?php COUCH::invoke(); ?>


I did notice the template tags missing but it's the couch/cms.php that makes the backend detect the page, sorry unsure of the answer to your issue i'm afraid

Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Page Name'>
<cms:editable name='publikace' type='richtext'/>
</cms:template>
<?php COUCH::invoke(); ?>
3 posts Page 1 of 1