Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2014-04-25 10:23:48
- eritropel
- Member
- From: Hamburg
- Registered: 2009-08-27
- Posts: 26
get value of custom fields from hidden articles - how?
Hi @all
What I want to do: grab the value of custom flieds from some articles with status “hidden” or “hide” (versteckt in german) to use it before the status will change to “live”.
This articles are badminton tournament result lists. In the custom fields I’ve stored i.e. location info, which is needed in advance.
I’ve found the smd_query plugin that may help me – but I’m unsure if and how…
something like this…
<txp:article_custom section="name" category="name1,name2,..." status="live,hidden" form="myForm" />
Last edited by eritropel (2014-04-25 10:25:42)
Offline
Re: get value of custom fields from hidden articles - how?
If you want to store future badminton games, you could as well use the publishing date instead. You can set the publishing date to future, e.g. after the game ends. You can access future articles with the article_custom tag if you set the time
attribute:
<txp:article_custom time="future" wraptag="ul" break="li">
<txp:category1 title="1" /> vs <txp:category2 title="1" />
at <txp:custom_field name="location" />
on <txp:posted format="%B %d, %Y" />
</txp:article_custom>
You could also do filtering based on sections:
<txp:article_custom section="scheduled" wraptag="ul" break="li">
<txp:category1 title="1" /> vs <txp:category2 title="1" />
at <txp:custom_field name="location" />
</txp:article_custom>
Last edited by Gocom (2014-04-25 11:36:46)
Offline
#3 2014-04-25 11:44:07
- eritropel
- Member
- From: Hamburg
- Registered: 2009-08-27
- Posts: 26
Re: get value of custom fields from hidden articles - how?
Thank you Gocom. That may the solution.
In between I’ve tried this:
<txp:smd_query column="*" table="textpattern"
where="section='minicup'
AND category1='Ergebnisse'
AND status=(4)"
wraptag="ul" label="custom fields" labeltag="h3">
<li>{custom_2}</li>
<li>{custom_3}</li>
</txp:smd_query>
It works well, but if the status is set to “2” or to (2 OR 4) in does not work. :-(
Is it generally unpossible to get value from articles with status = 2(hidden)?
Last edited by eritropel (2014-04-25 11:50:55)
Offline