From 10f51945ac703a80421f7a1d3aee36101e6485bc Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Wed, 11 Jan 2012 17:13:07 +0000 Subject: mobile version: added catalogue page for each device category --- h-source/Application/Models/GenericModel.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'h-source/Application/Models') diff --git a/h-source/Application/Models/GenericModel.php b/h-source/Application/Models/GenericModel.php index 64f24be..70bc816 100644 --- a/h-source/Application/Models/GenericModel.php +++ b/h-source/Application/Models/GenericModel.php @@ -81,13 +81,20 @@ class GenericModel extends Model_Tree { { $html = null; $listArray = array('page','history_page'); + + $count = 0; foreach ($viewArgs as $field => $value) { - if (!in_array($field,$listArray)) + if ($count < 5) { - $value = getTranslationFunction($field) !== 'gtext' ? gtext(call_user_func(getTranslationFunction($field),$value)) : gtext($value); - $html .= "
".$value."
\n"; + if (!in_array($field,$listArray)) + { + $value = getTranslationFunction($field) !== 'gtext' ? gtext(call_user_func(getTranslationFunction($field),$value)) : gtext($value); + $html .= "
".$value."
\n"; + + $count++; + } } } return $html; -- cgit v1.2.3