Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-12-02 16:02:10

Myusername
Member
Registered: 2019-12-12
Posts: 96

How to hide an author from an author list?

I have a simple list of authors:

<txp:authors break="li">
   <txp:author title=""/>
</txp:authors>

This displays all authors registered on the site, but I would like to hide some specific ones, but still keep them registered on the site. Is there any way?

*I’m using the smd_bio plugin, maybe it’s useful, I don’t know

Offline

#2 2020-12-02 17:03:50

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,451
Website

Re: How to hide an author from an author list?

if they belong to another group you can have

<txp:authors group="publisher, managing_editor, etc" break="li">
   <txp:author title=""/>
</txp:authors>

Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#3 2020-12-03 04:36:20

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,230
Website

Re: How to hide an author from an author list?

By using the name attribute and negation (not) ? See docs.

<txp:authors break="li" not name="author-to-hide">
   <txp:author title=""/>
</txp:authors>

(untested though)


Where is that emoji for a solar powered submarine when you need it ?

Offline

#4 2020-12-04 13:08:22

Myusername
Member
Registered: 2019-12-12
Posts: 96

Re: How to hide an author from an author list?

colak wrote #327212:

if they belong to another group you can have

The idea is to have a team page and not show members who have been inactive for some time. There is no specific group. Sometimes I need to hide a “publisher”, other times a “managing_editor”. And taking away the author’s privileges doesn’t seem ideal.

I had been thinking of something like phiw13 suggested, but it doesn’t work, and it looks like there is no way to exclude just one name from the list.

Anyway, I managed to get a better result using smd_bio. I created a “yes/no radio” field and then:

<txp:smd_bio_info fields="author_display">
    <txp:smd_if_bio field="author_display">
       <!-- block code-->
    </txp:smd_if_bio>
 </txp:smd_bio_info>

It will only display names that are “yes”.

Offline

#5 2020-12-05 09:58:05

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,230
Website

Re: How to hide an author from an author list?

Myusername wrote #327265:

I had been thinking of something like phiw13 suggested, but it doesn’t work, and it looks like there is no way to exclude just one name from the list.

Now that I had a chance to test, indeed it does not work. if I add the not attribute, the tag (<txp:authors />) outputs nothing at all. And I don’t see any error reporting in debug mode. Odd.

Anyway, I managed to get a better result using smd_bio. […]

Yeah, that would have been my next suggestion as well.


Where is that emoji for a solar powered submarine when you need it ?

Offline

#6 2020-12-05 10:31:00

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,451
Website

Re: How to hide an author from an author list?

phiw13 wrote #327280:

Now that I had a chance to test, indeed it does not work. if I add the not attribute, the tag (<txp:authors />) outputs nothing at all. And I don’t see any error reporting in debug mode. Odd.

Bug?


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#7 2020-12-05 11:23:04

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,230
Website

Re: How to hide an author from an author list?

colak wrote #327282:

Bug?

Maybe, I don’t know (yet), I’d have to do some more testing to verify. From what I can tell from the docs, not is global.


Where is that emoji for a solar powered submarine when you need it ?

Offline

Board footer

Powered by FluxBB