Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
flimmer Posted April 1, 2022 Posted April 1, 2022 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.
flimmer Posted May 26, 2022 Author Posted May 26, 2022 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.
opentype Posted May 26, 2022 Posted May 26, 2022 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.
flimmer Posted May 26, 2022 Author Posted May 26, 2022 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
opentype Posted May 26, 2022 Posted May 26, 2022 Or you add your functions to the article templates themselves. There you can easily work with the record data.
flimmer Posted May 26, 2022 Author Posted May 26, 2022 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.
Recommended Posts