Hey There.
I'm using the field plugin together with ftemplate and ymlfront. Everything looks good, but there are no links created as defined in field_tags. I hope it's just a mistake by me and someone can help me.
All three plugins are activated and ikiwiki's setup file reads
# field plugin
# simple registration
field_register => [qw{meta}],
# allow the config to be queried as a field
field_allow_config => 1,
# flag certain fields as "tags"
field_tags => {
Autor => '/users',
Rubrik => '/rubriken',
Themen => '/themen',
BuchTitel => 'rezensionen/titel',
BuchAutor => '/rezensionen/autoren',
Verlag => 'rezensionen/verlage',
},
I use this template to ask the users for the fields:
---
Autor:
BuchTitel:
BuchUntertitel:
BuchAutor:
Verlag:
ISBN:
Seiten:
Preis:
Rubrik: Rezensionen
Themen:
- (Anti-)Repression
- Aktion
- ...
---
[[!ftemplate id="rezi"]]
And this one tells what to do with them:
[[!meta author="<TMPL_VAR AUTOR>"]]
[[!meta title="<TMPL_VAR BUCHAUTOR>: <TMPL_VAR BUCHTITEL>"]]
<span class="infobox">
<TMPL_VAR BUCHAUTOR>:</br>
**<TMPL_VAR BUCHTITEL>**</br>
-<TMPL_IF BUCHUNTERTITEL><TMPL_VAR BUCHUNTERTITEL></TMPL_IF></br>
*rezensiert von <TMPL_VAR AUTOR>*</br></br>
* Verlag: <TMPL_VAR VERLAG></br>
* ISBN: <TMPL_VAR ISBN></br>
* Seiten: <TMPL_VAR SEITEN></br>
* Preis: <TMPL_VAR PREIS></br></br>
Rubrik: <TMPL_VAR RUBRIK></br>
Themen:
<TMPL_LOOP THEMEN_LOOP><TMPL_VAR THEMEN>
<TMPL_UNLESS __last__>, </TMPL_UNLESS>
</TMPL_LOOP>
</span>
<TMPL_VAR RUBRIK> # just for testing if infobox is the problem
Do I have to register another plugin with field or what is wrong here?
The
field_tags
option behaves like [[!tag ]] rather than [[!taglink ]] - that is, it flags the page as being linked to the tag page. In order to have an actual link, you have to put a link in the template, and use the "tagpage" variable suffix.For example:
This doesn't work. Even with a exact copy of your code it just get
where the "taglinks" should be.
Hmmm. What happens when you just have
<TMPL_VAR AUTOR-tagpage>
? Is that blank too?<TMPL_VAR AUTOR-tagpage>
without the square brackets[[
around it, is that blank too?Both were downloaded two days ago from their git repositorie's master branch.
Hmmm. They are the latest versions.
So what do you get when you use
<TMPL_VAR AUTOR>
? Is that blank?There's no rush. But please don't forget to document this -TAGPAGE thing.
I can't find any reference to it. Should be mentioned in the manpage.
Thanks for your help.
Releases done. And, yes, updating the docs was one of the things I did.
So, if you can try again with the latest version...
Great. This works.
Thanks again.