Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
<txp: if_author ...
Can anyone see why this code would always execute the else statement?
My real name is “Geoff Forster”. I write all the articles at the moment and don’t need my name all over the site.
If in the future if I have more authors …
<txp:if_author name=“Geoff Forster” >
<p> </p>
<txp:else />
<p class=“verdanagreen12”>Written by <txp:author link=“0”/></p>
</txp:if_author>
Thanks
Geoff
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
Re: <txp: if_author ...
I think if_author uses the login name not real name. Might be wrong, but try it.
Last edited by Bloke (2008-05-07 14:14:48)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: <txp: if_author ...
Hi Bloke,
No I had tried it.
Tried again and failed.
Thanks
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
Re: <txp: if_author ...
Hi Geoff
- I take it that you are using the code in an article form right?
- If you are the only author for now, why don’t you just delete the code?
- When you get new authors then your name will be needed and you can insert the appropriate code then
Last edited by colak (2008-05-07 14:39:19)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: <txp: if_author ...
Hi Colak
Yes,
Geoff
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
Re: <txp: if_author ...
You are misinterpreting the purpose of this tag. From Textbook:
The tag will execute the contained statement if the called page is the result of a article search by a specific author`s name.
I.e. <txp:if_author>
will evaluate whether your URL looks something like http://example.com/author/joe
<txp:if_article_author>
might be the tag your are looking for.
Last edited by wet (2008-05-07 18:07:25)
Offline
Re: <txp: if_author ...
Thanks Wet,
You are quite correct and it worked first time.
- Bloke – it is your ‘Log In’ name which you use.
Thanks for all your help
Geoff
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline
Pages: 1