FREELessons: 35Length: 7.7 hours

Next lesson playing in 5 seconds

Cancel
  • Overview
  • Transcript

6.3 Contacts

Having lots of users within a CMS may require us to keep a catalog of contact information. Happily, Joomla has just such a component. First we’ll create a contact category and a contact, and I’ll then generate more contacts off-camera. Then we’ll add menu items associated with the contacts component to generate content on the front-end.

6.3 Contacts

Hi, guys. Welcome back to A Beginner's Guide to Using Joomla! And in this lesson, we wanna take a look at the Contact component. So Joomla offers the ability to show contact information for a certain user. Even associating a contact form with a user. Now I'm going to create a contact page for my user account, Lawrence, the administrator. So I'm gonna go ahead and drop-down the components menu. And from there we're gonna target the contacts component and we have two options to create a contact item or a category item for our contacts. So I'm going to first of all create a category for our contact to be associated with. So first of all we must provide a title for this contact's category. Then on top of that we can either provide an alias or we can let it auto generate from the title. This is for SEO friendly URLs. Then I can provide a description for this category. Then we can set the parent category if we want to. I'm gonna leave it as no parent. So this category that I'm creating right here is gonna be sitting on the root level. Then on top of that we can associate tags with the category. We can select the status which I'm gonna leave it as Published enabled so we can view this on the front-end. The Access is gonna be Public but again you wanna be very careful with the viewing access level, especially when it comes to users' contact information. But for argument's sake I'm gonna leave it as Public. We can assign a language to this category, which I'm just gonna leave it on all, because I only have one language installed. Then on top of that, we have the note. Now, the note will actually show up in the tubular data, so when I go ahead and say save and close, the data comes up that tells us all the different contact categories. And in there you'll see a quick note. And also, you have the Version Note. Don't forget, this is an item within the contacts component, and there can be multiple versions of this contacts category. And so, with each version, we can attach a version note to tell us more about this specific version that we're saving of this contacts category item. Next up, we have the publishing tab. Again, we have lots of different pieces of information that can be displayed to us through read only fields. On top of that we can also select the Created By. And also we have the Meta Description, Keywords, Author, and also Robots as well because the Contacts Category page can be displayed as a front-end page. Then on top of that we have the Permissions. Which we select user group, and then we say what that user group can do with this specific Contacts Category item. Such as, can they create from the item such as duplicate and save and new. Then you have Delete. So are they allowed to actually delete it out of the trash, permanently removing the entry in the database for this Contacts Category item? Are they allowed to edit it and save changes? Are they allowed to edit the state of this contacts category item, and also you have edit own. Next up, we have a few more options, such as providing an Alternative Layout for this category page. So we can either use the global setting, or we can use the default setting from the contacts component, but however, I'm just gonna leave it as Use Global, and also we can associate an image with this category. Once I've done all that, I'm gonna say Save and Close. And now we have a newly created Contacts Category item. So now I'd like to create a contact. So let's go to Contacts, add a new contact, and this contact that I'm about to create is going to be associated with my Lawrence administrator account that I'm currently logged in as. So first of all, I'm gonna provide my full name right here. You don't have to, with a contact, but I will. Then you have the alias, which again, can be auto-generated from the title. Then on top of that we also have the ability to link this contact to a user account, which I'm gonna link it to my user account, Lawrence. Then we can also associate an image, typically one a profile picture, I'm just gonna slam a banner image in there. Then we can provide some self-explanatory information for that user. But then also you have the ability for the First Sort Field, Second and Third Sort Fields. So, what are these? Well, these are your separate names. Typically, you'll have a first name, middle and last name, but you could just have a first name and last name. And so what this is saying is, if somebody searches for that particular string it's gonna associate it with this account. So if they search Lawrence or Anthony or Turton just on their own. Then what's going to happen is it's gonna show up my account. Also don't forget you could put in a nickname right here. Such as Lars or something like that. Then we can associate a category with this contact. So let's say Admins, that's our newly Categories Contacts item. We can associate Tags with this contact. Set the Status, which I'm gonna leave as Published. Also we can say whether this contact is Featured or not. So I'm just going to leave that as No. Then also the Access level. So, I'm gonna say Public again. You wanna be very careful with who is able to actually view this contact information. And we can assign a language to this contact, and then on top of that you have your version note, because this is an item within the contacts component. Then we can take a look at the Miscellaneous Information where we can provide some more detail and information about this individual. Next up, we have the publishing option. So for example, the Start and Finish Publishing date so this is only viewable within a certain date and time and also we can say Created By. And also, we can create an alias for that user who created it, so I'll just say Loz is the alias. And then also you have other information or fields about this particular contact. And also we have some metadata to describe what this page, which is resembling a user, is all about to the search engines. Next up, we can choose what we'd like to display with our contact. So for example address, fax, telephone and other pieces of information about a contact. Now, we do have the global configurations for this component to say what can be displayed and what can't be by default. But we can override the global configurations if we want to by selecting on one of the drop-downs and overriding the defaults. Now also we have the ability to set the different links. So, Link A, B, C, D, and so on and so forth. So, I'm gonna go ahead and create all of those links, and I'm gonna give the links a label. So, that's what's seen by the user and then the link itself which is the URL that it's gonna go to. And then I'm just gonna do that for all the different links. And we'll take a look at these drop-down options at a later date when we look at the global configurations of the contacts component. Next up, we have the Form options. Now the Form options we are going to cover at a later date. But right now I want to save this contact. And then I'm gonna pause the video and we'll come back and you'll notice that I will have created a lot more contacts for us to have a little play around with. So now we have got four contacts in total. Now we have all of these contacts that are associated with the Admins contacts category. And on top of that we have two contacts that are Featured contacts. So again, I can go in here and I can just say whether I want them to be featured or not. So now we have this content on the back-end. But I want to do is convey this information onto the front-end. And the way we do that is through certain menu item types. So now I'm gonna take a look at the Menus Manager component, and we're gonna take a look at the Test Menu. I'm gonna select all of the menu items within the Test Menu and tell them to go into the trash. Now what I'd like to do is add in a new menu item, and each menu item type is going to be associated with the contacts component. Now let's add in a new menu item. I'm gonna select the menu item type, and it's underneath contacts. And we have Featured Contacts. So this will list out all of the Featured Contacts, which currently we only have two Featured Contacts. And let's just give it a quick title and then save and close. Now I'm gonna add in a new menu item. Select the menu item type. And under contacts we're gonna say List All Contact Categories. Then we get to set the top level category of where we'd like to start rendering from. So by default that's the Root level which both my categories, which is Uncategorized and Admins, they are on the Root level. So I wanna actually start on the Root level. But if I was to select a category such as Admins it would then render a list of subcategories to the category that I've selected. Then I'm just gonna give it a quick title of List Cats, and save and close. Now we need to add in another menu item. Select the menu item type, and this one is gonna say list all of the contacts inside of a category. So now what I can do is select a category that I'd like to list out all of the contacts associated with that category. And then finally, I can add in another menu item, and this one is going to link to a specific contact and display the information of that contact. Now again, don't forget the information that's provided is defined by the contact itself, not the menu item. Then, after I've said I want to display information for a single contact, we need to then select which contact we'd like to display their information. And then we can say save and close. So, now that we have all of our different menu item types that are associated with the contacts component, we can now take a look at this on the front-end. So, now let's direct our attention to the front-end, and all of the different menu item types and the content they produce. So, first of all we have the Featured Contacts. This gives us the tubular data of all the Featured Contacts, which we only had two Featured Contacts, which were Sally Salon, and also the Test Manager. And you can see right there that they're showing up. We can organize the tables, sort by their columns and we can even click on the contact to obtain the contact's information. Next up we have the List Cats page or list all contact categories. Now currently we can only see one contact category being listed here. Even though we told it to go to the root level and render all the categories on the root level. However, uncategorized is not showing up here and that is still technically classed as a category and it is on the root level. So why isn't it showing up in our list? Well, the reason why it's not showing up is because no contact is associated with that category. And by default empty categories are not listed cuz it's pretty pointless to list an empty category. So, I'm now going to reassign Audio Jungle Mike, and I'm going to reassign the category to Uncategorized and say save and close. Now when I hit Refresh we will have Uncategorized and also Admins as well. Now on top of this we can go ahead and click on the Category and it will list all of the contacts associated with the category. Now we also have a menu item that again links directly to a category and list all of the contacts within that category. So Admins contacts means it's going to list all of the contacts that are in the Admins category. So if I click right there it gives me the exact same page where I can see in a nice tubular format, all of the contacts associated with that Admins category. Then on top of there, we can click on the name of that contact, and get the specific contact details. Also, we can link directly to a contact by creating a menu item that links to a single contact. So you'll notice if I click right here, it takes me to a single contact page, and if I click right here, it again takes me to that exact same page for a single contact. And so we have a little bit of information, we have the image associated with that user. We have a Contact Form, and also we have some miscellaneous information as well. But, it's important to note that under Contact, we don't have all of the information that I gave. And that's because some personal information may be abstracted by default. Of course, you can override these defaults. But, for example, email addresses and other things are very personal. And it's not ideal to just have the public walk on in, take a look at those email addresses and of course, spiders and spam bots they'll find that email. And that user will get loads and loads of spam. So it's not ideal to do that. So that's why some information is hidden by default. So thank you for watching me in this lesson. And please join me in the next lesson where we'll learn more about the Contacts component.

Back to the top