Problems, need help? Have a tip or advice? Post it here.
10 posts Page 1 of 1
I'm using dynamic folders. I have one folder that has no content but I want to keep it in my navigation. I tried using the If/Else tags to display a message "No content available at the moment" but could not find the parameter for it. What would be the best way to do it? Thanks!
hi Threshold - have you tried
Code: Select all
    <cms:no_results>
      .....
    </cms:no_results>


Not sure if I've ever used it for cms:folders - but will probably work!
It works! Thank you! I could not find any documentation for this tag?
you're right ... it's one of those that's not made it into the docs
Is is impossible to use tags inside <cms:no_results>? I would like to add the folder title there.
Hi Threshold,

Can you please post your existing code here? (Just place dummy markers at place where you want your message to display).

Thanks.
Here it is:

Code: Select all
<cms:pages masterpage='ilmoitus.php' folder=k_folder_name>
   
<cms:no_results>
<h3>No available content</h3> 
</cms:no_results>
   
<h2><cms:show k_page_title /></h2>
<span class="paikkakunta"><cms:show k_page_foldertitle /></span> <span class="julkaistu">Julkaistu <cms:date k_page_date format='d.m.Y'/></span>
<p><cms:excerptHTML count='25' ignore='img'><cms:show ilmoitusteksti /></cms:excerptHTML></p>
<p class="luelisaa"><a href="<cms:show k_page_link />">Lue lisää</a></p>
       
</cms:pages>


The navigation:

Code: Select all
<div class="dropdown pull-right">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Paikkakunta <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<cms:folders masterpage='ilmoitus.php' >
<li><a href="<cms:show k_folder_link />"><cms:show k_folder_title /></a></li>
</cms:folders>
</ul>
</div>
Thanks.

Since you are using 'k_folder_name' variable, it can be assumed that the code is being executed in a 'folder-view'. In this view, all data pertaining to the folder being visited is already available. We can show those variables within the cms:no_results tag e.g.
<cms:pages masterpage='ilmoitus.php' folder=k_folder_name>

<cms:no_results>
<h3>No available content in <cms:show k_folder_title /> folder.</h3>
</cms:no_results>

...
</cms:pages>

Hope this helps.
Very cool, thank you!
Good morning,

Does the <cms:no_results> tag work with <cms:folders> tag?
I am not getting any output.

Code: Select all
<cms:folders masterpage=k_template_name>
    <cms:no_results>
        <div class="col-md-12">
            <div class="alert alert-warning gxcpl-button-shadow text-uppercase text-center">
      <strong>Nothing here yet. Please visit again.</strong>
            </div>
        </div>
    </cms:no_results>
</cms:folders>


Using the parameter dynamic_folders="1" in the <cms:template> tag.

Regards,
GXCPL (CTR Support)
Image
where innovation meets technology
10 posts Page 1 of 1
cron