Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Hello,

I´m testing and considering your CMS for my web related projects. I like it very much so far, (graphic designer here).

I have run into an issue, and found the solution but not sure if it is the intended behaviour. When working in the website menu, I have a code like this:

Code: Select all
   <nav class="second-nav" role="navigation">
         <a href="<cms:link 'centro.php'/>">El Centro</a>
         <a href="<cms:link 'blog.php' />">Blog</a>
         <a href="<cms:link 'contacto.php' />">Apúntate</a>
   </nav><!--end second-nav-->


This code doesn´t output the link to the pages, just an empty <a href>. But when using a list for the menu items, the code correctly outputs the links:

Code: Select all
   <nav class="second-nav" role="navigation">
         <li><a href="<cms:link 'centro.php'/>">El Centro</a></li>
         .
         .

   </nav><!--end second-nav-->

(even without the <ul> tag)
No big issue here, just it took me quite a time to figure a solution.

:)
Hi and welcome alejandro :)
Glad you liked Couch.

As for the problem you mentioned, that is highly intriguing behaviour.
Couch tags are not at all concerned with where you use them - the cms:link should output the proper link regardless of where you use it.

Would it possible for you to attach (or PM) the actual template with both the versions close to each other for comparision?

Thanks.
Well, the <li> tag was not doing anything... it isn´t needed.
In order to cms:link to properly output the link i needed to:
- create the target page (i tried to code the menu first without creating the actual pages)
- load that especific (eg. contact.php) page in the browser
- reload the admin page
-> the menu shows the correct link.

Am I doing a mess of this? :roll:
i tried to code the menu first without creating the actual pages

That is what was causing the problem :)
The cms:link tag actually searches for the specified template/page etc. and then outputs the proper link.
- load that especific (eg. contact.php) page in the browser
- reload the admin page
-> the menu shows the correct link.

By doing this you registered the template with Couch and so the cms:link could now find it and output its link.
<cms:thanks />
5 posts Page 1 of 1