Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2015-12-20 12:57:00
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,289
display articles from the future from certain section on a frontpage
hi!
i would like achive some sort of event calendar. if in “uritused” section page, the code below, working well: displaying only articles from the future:
<txp:if_section name="uritused">
<txp:article form="uritused" limit="3" time="future" sort="Posted asc" wraptag="div" break="div" class="tulbad-3" />
</txp:if_section>
form “uritused”:
<txp:if_individual_article>
<h1><txp:title /></h1>
<p class="posted"><txp:posted format="%d.%m.%Y" /></p>
<txp:body />
<txp:if_article_image><txp:article_image /></txp:if_article_image>
<txp:else />
<txp:permlink><div class="article-img">
<h6><txp:posted format="%d.%m.%Y" /></h6>
<txp:if_article_image><txp:article_image /></txp:if_article_image>
</div></txp:permlink>
<h5><txp:permlink><txp:title /></txp:permlink></h5>
<txp:excerpt />
</txp:if_individual_article>
but i would like to display first three articles from the future from a section “uritused”, on a frontpage as well.
now i have to use article custom
tag and section
attribute, correct? that’s where i stuck…. :(
could you help me?
Offline
Re: display articles from the future from certain section on a frontpage
Gallex wrote #297153:
but i would like to display first three articles from the future from a section “uritused”, on a frontpage as well.
now i have to usearticle custom
tag andsection
attribute, correct? that’s where i stuck…. :(could you help me?
Hi Gallex,
I guess what else and how you want to present those articles but the <txp:article />
tag has a time attribute too.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#3 2015-12-20 17:44:55
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: display articles from the future from certain section on a frontpage
Gallex wrote #297153:
but i would like to display first three articles from the future from a section “uritused”, on a frontpage as well.
now i have to usearticle custom
tag andsection
attribute, correct? that’s where i stuck…. :(
In Presentation > Section you can activate “Section appears on front page?”, so the list is shown with <txp:article />
on the Frontpage.
Offline
#4 2015-12-21 08:46:04
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,289
Re: display articles from the future from certain section on a frontpage
GugUser wrote #297156:
In Presentation > Section you can activate “Section appears on front page?”, so the list is shown with
<txp:article />
on the Frontpage.
yes, that’s a good option. but found (with little surprise), it still works this way too:
<txp:article_custom section="uritused" form="uritused" limit="3" time="future" sort="Posted asc" wraptag="div" break="div" class="tulbad-3" />
no “there is no article tag” error is showing up…
Offline
Re: display articles from the future from certain section on a frontpage
I guess the main difference is pagination.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline