How to get all articles from one author with a link?

How to get all articles from one author with a link?

Postby freaky on Tue Oct 02, 2007 10:42 am

Hello out there,

I´m new to lifetype and have a urgent question:
I have 5 persons (authors) which are writing on the blog.

How can I make a link or how does teh link look like to just get
the specific persons articles?

The link should appear in the menue.

I would be very thankful if you have any solutions for me!!!!!!!
:)



With best regards
Freaky
freaky
 
Posts: 4
Joined: Mon Oct 01, 2007 12:48 pm

Postby phunkphorce on Tue Oct 02, 2007 2:27 pm

If you have a $user object, you can do this:

Code: Select all
<a href="{$url->postUserLink($user)}">Posts by user {$user->getUsername()}</a>


You can get a $user object by calling $post->getUserInfo() inside the $posts loop, $blog->getOwnerInfo() to get the blog owner, or $blog->getUsersInfo() to get an array of all the users in the blog.
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby freaky on Wed Oct 03, 2007 7:09 am

Hey phunkphorce,

Thanks a lot for your quick answer!
I will try it and will give you feedback.

So far.

Greetz Freaky
freaky
 
Posts: 4
Joined: Mon Oct 01, 2007 12:48 pm


Return to Templates

cron