Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-05-07 14:04:01

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

<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>&nbsp;</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

#2 2008-05-07 14:14:28

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,449
Website GitHub

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

Offline

#3 2008-05-07 14:20:11

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

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

#4 2008-05-07 14:37:10

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

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

#5 2008-05-07 14:41:42

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

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

#6 2008-05-07 18:03:54

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

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

#7 2008-05-07 18:40:37

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

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

Board footer

Powered by FluxBB