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

I follow this tutorial --> http://www.couchcms.com/docs/tutorials/ ... log-2.html

And I stuck on part Latest News. So, I have my own blog and that Latest News shows only when I've opened some of articles (news). But when I'm on page where's all mine Articles, then Latest News Sidebar doesn't show up (there's only title Latest News).

How can I make that Latest News show up on every page?
Hi and welcome, Razvan.

Following is the portion of the code (in blog_sidebar.html) displaying the latest posts
Code: Select all
<cms:if k_is_page >
    <h4>Latest News</h4>
    <ul class="sidebar">
        <cms:pages masterpage='blog.php' limit='4'>
        <li><a href="<cms:show k_page_link />"><cms:show k_page_title /></a></li>
        </cms:pages>
    </ul>
</cms:if>

As you can see, the cms:pages tag doing the actual listing is enclosed within a conditional block
Code: Select all
<cms:if k_is_page >
   ..
</cms:if>

This causes the code to take effect only when the template is accessed in 'page-view' (i.e. when visiting a single cloned-page.

If you remove the condition, the latest pages will be displayed on all views.

Hope this helps.
It works! Tnx KK! :D

EDIT:

Now I have problem with my slider. I have slider on my Home page (index.php). So there's pictures which show up in slider:

<img src="./images/content/slide1.jpg" alt="slide1" title="#htmlcaption" />
<img src="./images/content/slide2.jpg" alt="slide2" title="#htmlcaption2" />
<img src="./images/content/slide3.jpg" alt="slide3" title="#htmlcaption3" />
<img src="./images/content/slide4.jpg" alt="slide4" title="#htmlcaption4" />

So, how can I make that I can change those pictures through CMS Admin Panel?
You are welcome :)
razvanrat wrote: It works! Tnx KK! :D

EDIT:

Now I have problem with my slider. I have slider on my Home page (index.php). So there's pictures which show up in slider:

<img src="./images/content/slide1.jpg" alt="slide1" title="#htmlcaption" />
<img src="./images/content/slide2.jpg" alt="slide2" title="#htmlcaption2" />
<img src="./images/content/slide3.jpg" alt="slide3" title="#htmlcaption3" />
<img src="./images/content/slide4.jpg" alt="slide4" title="#htmlcaption4" />

So, how can I make that I can change those pictures through CMS Admin Panel?


try to make an editable region for it raz.

IE :

make it repeatable.

name='slider_image' label='Image on slider at home' type='image'

<img src="<cms:show slider_image />" alt="slide1" title="#htmlcaption" />

dont forget to put repeatable.

hope this help ;)
As soon as possible!

Touch me up : abada[dot]zulma[at]gmail[dot]com
5 posts Page 1 of 1
cron