Forum for discussing general topics related to Couch.
16 posts Page 2 of 2
I can only see one editable region ('vijesti_velike') defined in your news template, so I am not sure if this is the template you are using in as the 'masterpage' on your homepage code -
<!-first short news on homepage---->

<div class="news-box">
<cms:pages masterpage='newsi.php'>
<div class="short-news">
<div class="img-vijest"><img class="slika-vijest" src="<cms:show first_img />" /> </div>
<h3><cms:date k_page_date format='d.m.Y.' /><a href="<cms:show k_page_link />"><cms:show k_page_title /></a></h3>
<cms:show/> </div>
</div>

Anyway, supposing this is the template following would be the way to display three of its pages on the home page (with only 100 words excerpted from the 'vijesti_velike' editable region)
Code: Select all
<cms:pages masterpage='newsi.php' limit='3'>
    <div class="news-box">
        <div class="short-news">
        <h3><cms:date k_page_date format='d.m.Y.' /><a href="<cms:show k_page_link />"><cms:show k_page_title /></a></h3>
        <cms:excerpt count='100'><cms:show vijesti_velike /></cms:excerpt>
        </div>
    </div>
</cms:pages>

Hope this helps.
KK wrote: I can only see one editable region ('vijesti_velike') defined in your news template, so I am not sure if this is the template you are using in as the 'masterpage' on your homepage code -
<!-first short news on homepage---->

<div class="news-box">
<cms:pages masterpage='newsi.php'>
<div class="short-news">
<div class="img-vijest"><img class="slika-vijest" src="<cms:show first_img />" /> </div>
<h3><cms:date k_page_date format='d.m.Y.' /><a href="<cms:show k_page_link />"><cms:show k_page_title /></a></h3>
<cms:show/> </div>
</div>

Anyway, supposing this is the template following would be the way to display three of its pages on the home page (with only 100 words excerpted from the 'vijesti_velike' editable region)
Code: Select all
<cms:pages masterpage='newsi.php' limit='3'>
    <div class="news-box">
        <div class="short-news">
        <h3><cms:date k_page_date format='d.m.Y.' /><a href="<cms:show k_page_link />"><cms:show k_page_title /></a></h3>
        <cms:excerpt count='100'><cms:show vijesti_velike /></cms:excerpt>
        </div>
    </div>
</cms:pages>

Hope this helps.


You help me. But there is a problem, when i added you're code everything is messed up. and his making a duplicated news on the homepage. You can see here

http://i58.tinypic.com/1fcsxw.jpg
http://i58.tinypic.com/20sio87.jpg

why is he making duplicated? and where is the "first news"?
Can you give me FTP+Couch access to your site please?
KK wrote: Can you give me FTP+Couch access to your site please?


Ok. I will send you for a few hours. Tnx for help. :)
Thanks.

I had a look and found you have used the following code
Code: Select all
    <div class="vijest-box">
      <cms:pages masterpage='vijesti.php'limit='1'>
      <div class="kratka-vijest">
        <div class="slika-vijest"><img  class="slika-vijest" src="<cms:show prva_slika />" /> </div>
        <h3><cms:date k_page_date format='d.m.Y.' /><a href="<cms:show k_page_link />"><cms:show k_page_title /></a></h3>
        <cms:excerpt count='10'><cms:show vijesti_velike /></cms:excerpt>  </div>
    </div>
   
    <div class="vijest-box">
      <div class="kratka-vijest">
        <div class="slika-vijest">  </div>
       <h3><cms:date k_page_date format='d.m.Y.' /><a href="<cms:show k_page_link />"><cms:show k_page_title /></a></h3>
        <cms:show/> </div>
   
    </div>
   
   
    </cms:pages>

Anything wrapped within cms:pages is repeated as many times as the pages fetched by the tag. You have placed the limit='1' so only one page will be fetched however you are showing the title of the same page twice. So it seems as if there are two pages fetched.

Please compare your code with what I had suggested in my previous post and you'll see the differences.

hope this helps.
KK wrote: Thanks.

I had a look and found you have used the following code
Code: Select all
    <div class="vijest-box">
      <cms:pages masterpage='vijesti.php'limit='1'>
      <div class="kratka-vijest">
        <div class="slika-vijest"><img  class="slika-vijest" src="<cms:show prva_slika />" /> </div>
        <h3><cms:date k_page_date format='d.m.Y.' /><a href="<cms:show k_page_link />"><cms:show k_page_title /></a></h3>
        <cms:excerpt count='10'><cms:show vijesti_velike /></cms:excerpt>  </div>
    </div>
   
    <div class="vijest-box">
      <div class="kratka-vijest">
        <div class="slika-vijest">  </div>
       <h3><cms:date k_page_date format='d.m.Y.' /><a href="<cms:show k_page_link />"><cms:show k_page_title /></a></h3>
        <cms:show/> </div>
   
    </div>
   
   
    </cms:pages>

Anything wrapped within cms:pages is repeated as many times as the pages fetched by the tag. You have placed the limit='1' so only one page will be fetched however you are showing the title of the same page twice. So it seems as if there are two pages fetched.

Please compare your code with what I had suggested in my previous post and you'll see the differences.

hope this helps.


this works. tnx for the help. but now i have some other problem i'm seeing "limit='1' before body of the page.

http://imgur.com/0tm4Idi

fixed
16 posts Page 2 of 2
cron