Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted September 2, 20186 yr IPS Page. How to get number of views on individual entry apparently this control the page views in listing .... i have been tinkering with it.. without any luck. {{foreach $row->stats(TRUE) as $k => $v}} <li {{if in_array( $k, $row->hotStats )}}class="ipsDataItem_stats_hot" data-text='{lang="hot_item"}' data-ipsTooltip title='{lang="hot_item_desc"}'{{endif}}> <span class='ipsDataItem_stats_number'>{number="$v"}</span> <span class='ipsDataItem_stats_type'>{lang="content_records_stat_{$k}" pluralize="$v"}</span> </li>{{endforeach}}
September 2, 20186 yr Author 14 minutes ago, Martin A. said: $row->mapped('views') Nope didn't work. throwing error...
September 2, 20186 yr Author 1 minute ago, Martin A. said: Where, and how, are you using it? I am using it record page ... as below. Quote {$row->mapped('views')}
September 2, 20186 yr Author 1 minute ago, Martin A. said: In that case, $record->mapped( 'views' ) is what you're after. Thanks worked like a charm! 🙂
Archived
This topic is now archived and is closed to further replies.