[Solved]Adding a Page only with a author's Articles

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
Maffeis
New Member
New Member
Posts: 2
Joined: Tue Mar 31, 2015 8:30 pm

[Solved]Adding a Page only with a author's Articles

Post by Maffeis »

I have to create a page that displays only the news from the author of the $page_alias. Like a select User1 in my menu and the page shows only User1's articles.

I saw one tip here that creates a link, but what i really want is a page, not a link. In the link I had to modify the template, I've done but didn't get it. I need the code to write in the page content to show the user's articles.

Thanks,
Maffeis

PS. I'm using CMS: 1.11.13, news module: 2.15.
Tks
Last edited by Maffeis on Wed Apr 01, 2015 12:40 pm, edited 1 time in total.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Adding a Page only with a author's Articles

Post by velden »

I think you currently can only do that by checking inside the summary template

Code: Select all

{foreach from=$items item=entry}
  {if $entry->author == $page_alias}
   ...
  {/if}
{/foreach}
Maffeis
New Member
New Member
Posts: 2
Joined: Tue Mar 31, 2015 8:30 pm

Re: Adding a Page only with a author's Articles

Post by Maffeis »

Thanks, I had to copy the code from template on each page, but your code really worked. Thanks a lot velden.
Post Reply

Return to “The Lounge”