Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-07-20 22:40:11

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 307
Website GitHub GitLab Twitter

Why txp:author links to frontpage only?

To avoid environment questions, I tested <txp:author link="1" /> on demo.opensourcecms.com/textpattern — the same flaw. You can verify yourself:

  1. create an article in the default section (named ‘articles’);
  2. then write some text and save it to another, ‘about’ section;
  3. view the result — fine, both are live;
  4. go to demo.opensourcecms.com/textpattern/author/adminadmin is your author name in this case.

You will see only one of your articles, witch is posted to the default section — on the front page. Why?

When I restrict <txp:author link="1" this_section="1" /> or <txp:author link="1" section="somesection" />, TxP works fine, I see all my articles, although from that one section (URL changes to domain.org/mysection/?author=My+Name from domain.org/author/My+Name). An attempt to list all section="onesection,anothersection" fails.

How to deal, what would your solution?

Sorry, I am novice there. Though one simple site already works, and on a second I have created quite complex forms successfully, but this problem still prevents from clear establishing of multi-user capability. According to The Tag Reference (Textbook), <txp:author link="1" /> should harvest all the author’s posts by default.

Offline

#2 2009-07-20 22:49:11

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Why txp:author links to frontpage only?

In Presentation->Sections on a new Txp install, the “about” section is set to not show on the front page.


Code is topiary

Offline

#3 2009-07-20 23:47:30

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 307
Website GitHub GitLab Twitter

Re: Why txp:author links to frontpage only?

I am willing to link all the author’s posts. Not only from a front page.

Offline

#4 2009-07-21 00:45:46

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Why txp:author links to frontpage only?

Right, you just need to change all sections to show on front page to get them to appear in your articles-by-author lists.


Code is topiary

Offline

#5 2009-07-21 06:36:23

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 307
Website GitHub GitLab Twitter

Re: Why txp:author links to frontpage only?

But why? It is TxP flaw? Bug? Strange feature? Are not any workaround?

BTW, I do not need to list articles by authors, only want to make an author’s name usable — linked to their posts.

P.S. My front page will be mostly static, with one or few posts from other sections.

Last edited by Vienuolis (2009-07-21 07:01:21)

Offline

#6 2009-07-21 11:08:39

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: Why txp:author links to frontpage only?

You made me recall that years ago I made a small and messy conditional plugin for displaying author’s article list in default page template. Don’t sure if it fits your need, but here it is: bos_if_author_article_list.

I think I’ve never published it, or I can’t find it anywhere. I’m using it on a live site to link article list from standard txp:author link=“1” tag.

Z-

Offline

#7 2009-07-21 11:16:24

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Why txp:author links to frontpage only?

Vienuolis wrote:

But why? It is TxP flaw? Bug? Strange feature? Are not any workaround?

A feature, actually not strange, indeed very useful. “On front page”, as the option is labelled, doesn’t give the whole picture. For one thing, you can make any article appear on the front page using the article_custom tag. “On front page” only applies to the article tag. “Front page” is misleading, too, because (in this case) it includes e.g. <http://mysite.com/>, <http://mysite.com/?c=some-category>, and <http://mysite.com/?author=Author%20Name>. We really need to come up with a better terminology for this.

So, looking at a new Txp installation, it is set up in typical blog style, with just two sections: “article” and “about”. “About” is set to not show on the front page, presumably because it will contain static articles that you wouldn’t want to appear in a typical blog listing.

BTW, I do not need to list articles by authors, only want to make an author’s name usable — linked to their posts.

I do not understand the distinction — “linked to their posts” means listing their articles, does it not?

P.S. My front page will be mostly static, with one or few posts from other sections.

Then there is no harm in setting all sections to show “On front page”. Then if someone does a category or author search, all the articles will appear.

Also note that search results (i.e., <http://mysite.com/?q=search-term>) are not affected by the “On front page” setting. Search has its own option, “Include in site search”.


Code is topiary

Offline

#8 2009-07-21 12:24:27

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 307
Website GitHub GitLab Twitter

Re: Why txp:author links to frontpage only?

I am not talking about design of a front page. I just ask why <txp:author link="1" /> do not work as intended, as is written on The Tag ReferenceMake text a link to the author’s posts. Nowhere written select author’s articles from the front page only or similar. Why listing is restricted in fact, what is the reason? Should I use plugins for such a simple task?

I do not understand the distinction — “linked to their posts”

Sorry for the mistake, I had in mind linked to his posts. To complete listing of this author’s articles.

Last edited by Vienuolis (2009-07-21 12:53:27)

Offline

#9 2009-07-21 12:49:40

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

Re: Why txp:author links to frontpage only?

Vienuolis wrote:

why <txp:author link="1" /> do not work as intended

As jsoo has said, it does work but it’s subject to TXP’s rules.

When you click an author’s link it creates a URL like this: site.com/author/AuthorName. The ‘author’ section (for want of a better word) is not a real section in your site, it just tells TXP that we are in an author list; the same way that the ‘category’ in site.com/category/nuts-and-bolts is not a real section. Both of those examples actually run the Page template assigned to your default page, also called the front page (and again, as jsoo says, this is perhaps somewhat misleading).

TXP’s front page acts differently to all other pages: any articles that are being displayed using <txp:article /> will only be displayed if the article’s section has show on front page selected. So, if your authors have contributed to more than one section, you must ensure that all those sections have show on front page selected in order to see them in the author list on the front page. It’s just the way TXP works.

It would perhaps be better if one could redirect the <txp:author /> tag to an arbitrary section that is not the default Page because then this feature goes away. Not sure if that’s possible, though.

Should I use plugins for such a simple task?

I always liked bos_author. Incidentally, even though it’s probably overkill in this situation, smd_bio is on its way and that can list author articles from any page… *mystery mode on* :-)

Last edited by Bloke (2009-07-21 12:52:19)


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

#10 2009-07-21 12:50:25

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Why txp:author links to frontpage only?

I might be able to do a better job answering your questions if you told me why you want to set some sections not to show on the front page.

There are two ways this discussion might continue in a useful way:

  1. discuss specific goals for this website and which tags to use to meet those goals
  2. discuss the theoretical underpinnings of Txp

Which are you more interested in?


Code is topiary

Offline

#11 2009-07-21 12:51:54

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Why txp:author links to frontpage only?

Bloke wrote:

smd_bio is on its way… *mystery mode on* :-)

Vaporware!

I suppose we’ll see it later today :)


Code is topiary

Offline

#12 2009-07-21 12:53:56

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

Re: Why txp:author links to frontpage only?

jsoo wrote:

Vaporware!

:-D Hehehe, in this case, it’s in use on a real site. But it’s a 4.2.0 only plugin so I’m keeping it under wraps for a bit.


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

Board footer

Powered by FluxBB