2

we have on our template the possibility to creat an Gallery View for Content / Categories. it looks like the following: enter image description here

so and now - i'm trying to get the same view for the contacts. In contacts there are also categories and items, so i guess it should be possible.

i copied the following files in to the template folder for contact (com_contact):

gallery.xml
gallery_children.php
gallery_item.php
gallery_links.php

i'm getting now an error in the main file gallery.php: Notice: Undefined property: ContactViewCategory::$intro_items in /srv/www/vhosts/kubler.ch/httpdocs/templates/as002057/html/com_contact/category/gallery.php on line 103

on these lines around it looks like this (101-104:

<?php
$introcount = (count($this->intro_items));
$counter = 0;
?>
0

1 Answer 1

1

You can't copy files from one component view to another. View have been coded specially for that specific component. The variable names for com_content are different to com_contact

Don't try and do things to quick way ;) What I would suggest doing is creating your basic Template Override by copying the view files from com_contact to your template.

From here on, start merging the structural changes from your gallery into the com_contact override. It may seem a little time consuming but it's the only way.

Hope this helps

4
  • I did already did what you said. I copied the gallery files from the template overrides folder com_content and copied it to the override folder of the template com_contact. So actually i'm able now to choose the Gallery View as new Menu Type. But i need some help with PHP - the categories of the contacts are not showing up.
    – GreenLion
    Oct 3, 2014 at 9:38
  • No, I said not to copy the gallery files from com_content to com_contact as these views are specifically for articles, not contacts.
    – Lodder
    Oct 3, 2014 at 9:43
  • yes but how can i get the gallery view to work on contacts then?
    – GreenLion
    Oct 3, 2014 at 10:33
  • I've have explained this in my answer. Please read it again
    – Lodder
    Oct 3, 2014 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.