How to Hide a Teacher's Email in OSCampus Pro

A customer recently asked how to remove the teacher's email link from the Teacher tab in an OSCampus Pro course. You can do this using Joomla's Template Override feature.

In this blog post, we’ll show you how to achieve this with a simple template modification.

Here’s what the email link looked like before hiding it:

the teacher email link

And here’s how it looks after hiding it:

the link gone

Achieving this is a two-step process:

  1. Create a com_oscampus/course template override.
  2. Edit the default_teacher.php file.

Let's look at this process in more detail.


Step #1. Create a com_oscampus/course Template Override

  • In your Joomla admin dashboard, go to System > Site Templates:

the site templates link

  • You will see the Templates: Templates (Site) screen, as shown in the next image. Click on the name of your currently active Joomla template in the Template column:

the template title

  • This will take you to the Templates: Customise (name-of-your-template) screen. Click the Create Overrides tab:

the create override tab

  • In the Components column, click com_oscampus > course:

the course link

  • You will see the Override created message, as shown in the next image.

the override created message

Great! You've just created a copy—known as a template override in Joomla—of the OSCampus Pro course page. Now, you're ready to move on to the next step and edit it as needed.


Step #2. Edit the default_teacher.php File

  • Click the Editor tab. Then, navigate to: html > com_oscampus > course > default_teacher.php:

the default_teacher file link

  • This will open the Override file (editable) panel, displaying the code of the default_teacher.php file. Locate and delete the code on lines #41, #42, and #43:

the code to delete

  • Click Save or Save & Close.
  • Now, check the Teacher tab on the front end of your OSCampus Pro course. The Email link should be gone, just as you intended.


What's Next?

Save $1,000's when you sign up for Joomlashack's Everything Club.

You will get your hands on our extensive range of over 20 extensions, plus legendary support!

Click here to join the Everything Club