Hot answers tagged

4

I finally solved it myself. I modified my com_contact category default_children template to load another template part (called it catitems): <?php if ($child->numitems > 0 ) : $this->children[$child->id] = $child->getChildren(); $this->category = $child; $this->maxLevel--; echo $this->loadTemplate('catitems'); $...


3

You will firstly need to retrieve the user ID like so: $id = JFactory::getUser()->id; Then get the array of profile data, like so: $profile = JUserHelper::getProfile($id)->profile; You can now access any of the data: echo $profile['address1']; echo $profile['address2']; echo $profile['city']; echo $profile['region']; echo $profile['country']; echo ...


3

Ok, so in your override, on lines 47 and 49, you'll see <li> tags. Inside both of them, add the following data attribute: data-category="<?php echo substr($this->escape($item->name), 0, 1); ?>" Then, on line 111, you'll see the closing </ul> tag. Directly below this, add the following to create you alphabet list: <?php $...


2

This is not the direct answer to your question, it is more for information and to give you some basic direction. It seems that you do not have full understanding of how things work, and why you can't add html in the fields there. The fields you are trying to add html, are not designed to accept html. Furthermore, even if they would allow some html, I am not ...


2

Edit the file administrator/components/com_contact/models/forms/contact.xml and find field below code <field name="address" type="textarea" label="COM_CONTACT_FIELD_INFORMATION_ADDRESS_LABEL" description="COM_CONTACT_FIELD_INFORMATION_ADDRESS_DESC" rows="3" cols="30" Add filter to it like below: <field name="address" type="textarea" ...


2

You would create the module independently, then either use the Joomla load module or Regular Labs Modules Anywhere to load within the article: https://docs.joomla.org/How_do_you_put_a_module_inside_an_article https://www.ostraining.com/blog/joomla/loadposition-loadmodule https://www.regularlabs.com/extensions/modulesanywhere For the module itself, here ...


2

I would override the profile model with a plugin: https://community.joomla.org/blogs/community/521-did-you-know-overrides-are-not-just-for-html.html https://docs.joomla.org/How_to_override_the_component_mvc_from_the_Joomla!_core Or alternatively overriding profile fields with plugin: https://docs.joomla.org/Creating_a_profile_plugin Here is a similar ...


2

I know this is not direct answer to your question, but there's free module that does exactly what you want: http://www.aftercube.com/demo/free-extensions/ac-contacts Cheers!


2

If you have created a Joomla menu that goes directly to a single contact such as the following: Then you will need to update the contact's phone number through the contact component: components/contacts/[the contact selected in the menu]


1

You can create an language override: https://docs.joomla.org/J3.x:Language_Overrides_in_Joomla


1

I believe the fields are only available to the component for which they were created, being an extension of that component. If you think about, if you add {field 1} to an article, how does the article know that you mean field 1 from com_contacts or any other component. Maybe one day custom fields might advance to allow {com_contacts:field 1} which would ...


1

You may find this helpful, I did. https://docs.joomla.org/J3.x:Adding_custom_fields/Overrides It has been years, but if you examine your array you will find the proper value of [#]. You can then modify your code. Add this at the bottom of your override to see the contents of the array: snippet: echo '<pre>'; print_r($array); echo '</pre>';


1

$user = JFactory::getUser(); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('*')->from('#__contact_details')->where('user_id = '.(int)$user->id); $db->setQuery($query); $contacts = $db->loadObjectList(); /* one user can be associated with multiple contacts */ if($contacts) { /* do stuff with the contact ...


1

Official solution Actually my initial solution was just a quick work-around. It didn't seem right, as it will check only against the specific show_street_address param. Joomla probably is doing another check for if the address should be shown or not, and that is with the address_check param - but this is missing, so it always default to false. This is a ...


1

I also made a few changes to Lodder's excellent post to go back to listing all items: echo '| <a href="#" data-alpha="000">All</a> | '; $alphas = range('A', 'Z'); foreach ($alphas as $item) { echo '<a href="#" data-alpha="' . $item . '">' . $item . '</a> | '; } and for the JS script: JFactory::getDocument()->...


1

I am not sure what is the thing you are looking to define - assuming this is to select a table layout instead of the default list one. But does it have to be a table? The menu item Contacts ->Lists all contacts in a category will display a list of contacts from a selected category, that at least in the protostar template someone could say that it looks ...


1

how is the map being added to the page? The site indicated uses "Google Maps by Reumer" plugin, which is one of the best choices available at the time of this answer for that purpose. why does it disappear when I change the contact type? The map is achieved by replacing a plain text plugin code in curly brackets {mosmap} with the proper Google Maps code....


Only top voted, non community-wiki answers of a minimum length are eligible