Jump to content

Pages, listing authors other entries?


Recommended Posts

Hi

Is there some (easy) way of listing the other articles of the author of the current article/entry ? For example have a list of the last 6 articles or similar? If not, any advice how to create something like that?

Thanks.

Link to comment
Share on other sites

  • 1 month later...

Would it perhaps be possible to create a custom block that checks the author of currently viewed article?

I have a block now with custom content that lists ALL articles/entries which loops through the records like so:

{{foreach $records as $record}}

//output record image

{{endforeach}}

Maybe I in this loop can check that the current records author is the same as the author of the "main" article/entry being viewed? I just do not know what kind of "variables" are available to look at.

Link to comment
Share on other sites

The block is parsed independently from the rest of the page, so you can’t just compare content from one part of the page with content from another part. At least that is what I would expect. 

To inspect what’s in a variable:

{{$test=var_dump($record);}}{{exit;}}

This will output the variable content to the screen when the record is viewed and the variable is available. 

Link to comment
Share on other sites

Ok, so I probably need to create a link on my page that send the viewer to the authors profile page with "prefilled" activity content filter.

Like /index.php?/profile/username/content/&type=cms_records5&change_section=1

Link to comment
Share on other sites

Just now, opentype said:

Or you add your functions to the article templates themselves. There you can easily work with the record data.

Probably, but that is beyond my knowledge. I understand somewhat how I can manipulate the article template and show some stuff like a link to author, but will not be able to add functions to display the authors latest entries in database.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...