Display block per module



Hire Us!Download Video(0)Comments


This tutorial will allow you to display a phpnuke block only in the module of your choice. An example would be if you would like a block about tutorials displayed only in the Web_Links module.

Steps :
1. In this example we will display the Languages block only when the user visits the Web_Link module.
Open your themes/YOUR_THEME/theme.php (We will use the NukeNews theme as an example)
Find the following function close to the bottom of the file.

Directly under that line we will start to check if is it the correct module and also the correct block name. Add the following codes.

This part is really easy to explain. As you can see the "Language" refers to the name of the block that you want to be seen only on a certain page. The 'Web_Links' refers to the name of the module. You can change these to your own needs.

The final step is to close the bracket. Find the following within the blocks function

Directly under that line add the closing bracket

Your final codes should look similar to the following:

That's it! Save and upload

 

Consider buying me coffee if you find this tutorial helpful.


Hire Us!Download Video(0)Comments