Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted April 1, 20222 yr 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.
May 26, 20222 yr Author 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.
May 26, 20222 yr 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.
May 26, 20222 yr Author 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
May 26, 20222 yr Or you add your functions to the article templates themselves. There you can easily work with the record data.
May 26, 20222 yr Author 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.