Hi,
New to couchcms today. I've been given some code to look at. There is a menu where each items links to a k_folder_link with each individual page listed within.
We'd like to have some of the menu items links directly to content rather than a list of sub-pages. So rather than k_folder_link they would link to k_page_link.
Looking at the template I can the following outputs the menu
I would like to make the a href link to, I presume, k_page_link in cases where the folder has some text in the description box held in the k_page_folderdesc variable.
Now I've had a search around but I imagine I am missing an easy way to do this.
Would it be something like (pseudocode) :
<cms:if "<cms:k_page-folderdesc>"><a href="<cms:show k_page_link />"</cms:if>
<cms:else><a href="<cms:show k_page_link />" </cms:else>><cms:show k_folder_title /></a>
Thanks in advance for any help.
New to couchcms today. I've been given some code to look at. There is a menu where each items links to a k_folder_link with each individual page listed within.
We'd like to have some of the menu items links directly to content rather than a list of sub-pages. So rather than k_folder_link they would link to k_page_link.
Looking at the template I can the following outputs the menu
- Code: Select all
<div id="sidemenu">
<cms:set current_folder=k_folder_link />
<cms:folders masterpage='products.php'>
<li <cms:if "<cms:is_ancestor parent=current_folder child=k_folder_link />" >class="productsnav productsnavlong"<cms:else /> class="productsnav"</cms:if> ><a href="<cms:show k_folder_link />"><cms:show k_folder_title /></a></li>
</cms:folders>
</div>
I would like to make the a href link to, I presume, k_page_link in cases where the folder has some text in the description box held in the k_page_folderdesc variable.
Now I've had a search around but I imagine I am missing an easy way to do this.
Would it be something like (pseudocode) :
<cms:if "<cms:k_page-folderdesc>"><a href="<cms:show k_page_link />"</cms:if>
<cms:else><a href="<cms:show k_page_link />" </cms:else>><cms:show k_folder_title /></a>
Thanks in advance for any help.