Hello,
I'm new working with Couch and i need a little advisory on my work.
A have created a news site with this structure: Blog (articles, pages with all articles of a certain category) and the homepage (index) where i want to post certain articles which already exists and have been created in blog.
For that i was thinking creating a dinamic input like checkbox, named "Featured" - for the article display on homepage. My problem seems to be the "if" condition.
Beacuse, it didn't worked with checkbox, i tried with "my_property_type", but couldn't make it work either.
This is what i had in mind:
On blog.php
<cms:editable name="my_property_type" label="Status articol" desc="Selecati una din valori"
opt_values='Featured | Common'
opt_selected = 'Common'
type='dropdown'
/>
On index.php - condition
<div class="article1">
<cms:if my_property_type='Featured' >
<cms:pages masterpage="blog.php" limit="1" folder='educatie' >
<h2><a hre="<cms:show k_page_link />"><cms:show k_page_title /></a></h2>
<div class="clr"></div>
<cms:show k_page_foldertitle /> - <cms:date k_page_date />
<img src="<cms:show blog_image />" alt="" width="195" height="132" />
<cms:excerptHTML count='55' ignore='img'><cms:show blog_content /></cms:excerptHTML>
<p><a href="<cms:show k_page_link />"> Read More...</a></p>
</cms:pages>
</cms:if>
</div>
Or for the checkbox case:
<div class="article1">
<cms:if "<cms:not_empty featured />" {where featured is the name of the input}
<cms:pages masterpage="blog.php" limit="1" folder='educatie' >
<h2><a hre="<cms:show k_page_link />"><cms:show k_page_title /></a></h2>
<div class="clr"></div>
<cms:show k_page_foldertitle /> - <cms:date k_page_date />
<img src="<cms:show blog_image />" alt="" width="195" height="132" />
<cms:excerptHTML count='55' ignore='img'><cms:show blog_content /></cms:excerptHTML>
<p><a href="<cms:show k_page_link />"> Read More...</a></p>
</cms:pages>
</cms:if>
</div>
I would really appreciate a little help!
THank you!
I'm new working with Couch and i need a little advisory on my work.
A have created a news site with this structure: Blog (articles, pages with all articles of a certain category) and the homepage (index) where i want to post certain articles which already exists and have been created in blog.
For that i was thinking creating a dinamic input like checkbox, named "Featured" - for the article display on homepage. My problem seems to be the "if" condition.
Beacuse, it didn't worked with checkbox, i tried with "my_property_type", but couldn't make it work either.
This is what i had in mind:
On blog.php
<cms:editable name="my_property_type" label="Status articol" desc="Selecati una din valori"
opt_values='Featured | Common'
opt_selected = 'Common'
type='dropdown'
/>
On index.php - condition
<div class="article1">
<cms:if my_property_type='Featured' >
<cms:pages masterpage="blog.php" limit="1" folder='educatie' >
<h2><a hre="<cms:show k_page_link />"><cms:show k_page_title /></a></h2>
<div class="clr"></div>
<cms:show k_page_foldertitle /> - <cms:date k_page_date />
<img src="<cms:show blog_image />" alt="" width="195" height="132" />
<cms:excerptHTML count='55' ignore='img'><cms:show blog_content /></cms:excerptHTML>
<p><a href="<cms:show k_page_link />"> Read More...</a></p>
</cms:pages>
</cms:if>
</div>
Or for the checkbox case:
<div class="article1">
<cms:if "<cms:not_empty featured />" {where featured is the name of the input}
<cms:pages masterpage="blog.php" limit="1" folder='educatie' >
<h2><a hre="<cms:show k_page_link />"><cms:show k_page_title /></a></h2>
<div class="clr"></div>
<cms:show k_page_foldertitle /> - <cms:date k_page_date />
<img src="<cms:show blog_image />" alt="" width="195" height="132" />
<cms:excerptHTML count='55' ignore='img'><cms:show blog_content /></cms:excerptHTML>
<p><a href="<cms:show k_page_link />"> Read More...</a></p>
</cms:pages>
</cms:if>
</div>
I would really appreciate a little help!
THank you!