How can I show the "Views count" on the single ima
schlieper
Joined: 2005-02-06
Posts: 18 |
![]() |
How can I show the "Views count" on the single image views? Example-Gallery-Image [Matrix-Layout]: ---- |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
make a local tpl for photo.tpl and add showViewCount=true to the {g->block type="core.ItemInfo" ...} near the top. |
|
schlieper
Joined: 2005-02-06
Posts: 18 |
![]() |
mindless wrote:
make a local tpl for photo.tpl and add showViewCount=true to the {g->block type="core.ItemInfo" ...} near the top. Thanks! I´ve tried this, but the counter is only shown in the left picture-block, but not on the Picture-site: -------- Ralf PS: I am using "matrix-Greymatter" template/theme |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
ah, right.. the data isn't loaded. |
|
schlieper
Joined: 2005-02-06
Posts: 18 |
![]() |
mindless wrote:
ah, right.. the data isn't loaded. Hi mindless, I´ve tried this also, but the counter isn´t shown: Here are my modifications in: return array(GalleryStatus::success(), 'theme.tpl'); Ralf PS: Caches were cleared |
|
schlieper
Joined: 2005-02-06
Posts: 18 |
![]() |
Does anybody else know the solution of my problem? Thanks. Ralf |
|
swift
![]()
Joined: 2003-12-08
Posts: 39 |
![]() |
I'd love to be able to do this too, any suggestions? What is that 'imageViews' data chunk that gets loaded (I tried it and it was empty, but am now curious as to what it contains). Anyway, any help on showing view counts on the item page would be great |
|
razvansg
Joined: 2006-11-21
Posts: 4 |
![]() |
it took me 3 hours and lots of pain. and the last post here is 2 years old. ill post the response anyway for anyone who may come accros this problem in the future. You need to modify this: (on the matrix theme for example) $dataTypes = array('owner', 'parents', 'systemLinks', 'itemLinks', 'permissions', if ($ret) { return array(null, 'theme.tpl'); function showPhotoPage(&$template, $item, $params) { $dataTypes = array('owner', 'parents', 'systemLinks', 'itemLinks', 'permissions', if ($ret) { return array(null, 'theme.tpl'); |
|
razvansg
Joined: 2006-11-21
Posts: 4 |
![]() |
Oh, and then of course you want to show the "view count" on your photo page dont you? In gallery2\themes\matrix\templates\photo.tpl you introduce the following block where ever suits you: The extra argument that had to be added is "showViewCount=true". |
|
ctuft
Joined: 2002-09-02
Posts: 1 |
![]() |
Thanks razvansg. With your help, this only took me 5 mintues to get working! Thanks for posting your solution to such an old thread... |
|