|
Use MetaMod to put modules into different positions on different templates |
|
Recipes - MetaMod 1.5 -
General
|
|
If you use more than one template on your site, you have probably run into this issue: different templates often use different names for their module positions. “top” in one template might be called “header” in another.
So how do you get a module to appear in the position “top” in one template, but “header” in another? Read on to find out how MetaMod can solve this for you without having to hack any template code!
|
|
See Recipe
|
|
Control modules based on page content/keywords/description |
92
(14 votes, average 4.07 out of 5)
|
Recipes - MetaMod 1.5 -
General
|
|
Using this awesome recipe you can control which modules appear on the page by placing keywords in the content of the Joomla article, the Meta Keywords field, or the Meta Description. You just set up the recipe with a list of keywords to detect, the module IDs to be displayed when those keywords appear, and where MetaMod should look for them (content, description or keywords). A variation of this recipe allows you to enter the module IDs directly into the Meta Keywords.
|
|
See Recipe
|
|
Show a module just once, for any user (cookied) |
91
(2 votes, average 4.50 out of 5)
|
Recipes - MetaMod 1.5 -
General
|
|
In this recipe we show a particular module to a user only once, then cookie their browser. The MetaMod picks up that cookie on the next page (or time) they visit, and won’t show the module again. (See also Show a Module Once Per Session)
|
|
See Recipes
|
|
Control modules based on article author |
88
(2 votes, average 3.00 out of 5)
|
Recipes - MetaMod 1.5 -
General
|
|
In this recipe we detect if we are viewing a Joomla “article” page, and get hold of the author id. Based on this, we can make decisions on what modules show on the page – for example we could show particular banner ads for certain authors, on any page they have authored. UPDATED FOR JomGenius!
|
|
See Recipe
|
|
Show a different menu depending on whether a user is logged in or not |
87
(14 votes, average 3.79 out of 5)
|
Recipes - MetaMod 1.5 -
General
|
|
One of the most common uses for MetaMod is to show a different Joomla menu to users once they are logged in. E.g. the menu for non-logged-in users may contain a “Log in” menu item, and the one for logged in users might have a completely different selection of menu items.
|
|
See Recipe
|
|
Control modules based on how many articles the user has published |
|
Recipes - MetaMod 1.5 -
General
|
|
Your Joomla site may have a number of authors on it who are submitting articles. You would like to be able to display modules based on how many articles the logged-in user has published/submitted, e.g. show a module saying “You have reached GOLD level by submitting over 100 articles!”. The following recipes show how it’s done.
|
|
See Recipes
|
|
Control modules based on selected Joomla template |
84
(1 vote, average 5.00 out of 5)
|
Recipes - MetaMod 1.5 -
General
|
|
Joomla lets you display different pages on your site with different templates. Unfortunately this can play havoc with your modules, because different templates put the different modules positions on different parts of the page, or call them different names. These recipes will help you to hide or change certain modules if the page is displayed on certain templates, etc.
|
|
See Recipes
|
|
Display different modules on different subdomains |
83
(4 votes, average 4.50 out of 5)
|
Recipes - MetaMod 1.5 -
General
|
|
In this scenario you have a number of subdomains all pointing into the same main domain. e.g. www.example.com, alabama.example.com, alaska.example.com. You want to have different modules displayed on each of the different domains, even though the main content of the pages is the same for each. How do you do it?
|
|
See Recipe
|
|
Show modules on all submenus of a menu item |
82
(4 votes, average 4.25 out of 5)
|
Recipes - MetaMod 1.5 -
General
|
|
This simple but effective recipe allows you to place modules on all pages that are “children” of a particular menu item. This can help you to manage your modules without having to continually allocate new pages to your modules whenever you add a new sub-menu item to a parent menu. Two extra variants are provided: (1) how to show modules only on submenus of a given menu item (not including the parent), and (2) how to show modules on all submenus of an entire menu (e.g. “mainmenu”, “usermenu” etc)
|
|
See Recipes
|
|
Select modules based on Referer URL |
81
(2 votes, average 4.50 out of 5)
|
Recipes - MetaMod 1.5 -
General
|
|
Have you seen web sites that detect that you found the page via a Google search, and give you some extra information about the site or about what you searched for? This recipe allows to to detect the “referer” that sent the visitor to your site, and gives you the ability to switch modules based on this information.
|
|
See Recipe
|
|
Include PHP code directly in MetaMod |
80
(2 votes, average 4.50 out of 5)
|
Recipes - MetaMod 1.5 -
General
|
|
A MetaMod can be used as a general purpose PHP module, because any text that you output from the module will appear in the module position. This recipe shows you how.
|
|
See Recipe
|
|
Include HTML directly in MetaMod |
79
(3 votes, average 4.00 out of 5)
|
Recipes - MetaMod 1.5 -
General
|
|
MetaMods are able to output raw HTML code. If you are using the basic time/date or GeoIP parameters from the MetaMod, then you can use these to control whether or not the raw HTML will be displayed – this saves having to create a Custom HTML module just for the purpose of outputting a bit of HTML.
|
|
See Recipe
|
78
(3 votes, average 5.00 out of 5)
|
Recipes - MetaMod 1.5 -
General
|
|
MetaMods have a lot of data at their disposal. The rules based on this data are not restricted to just selecting modules – you can make Joomla perform other actions as well. In this recipe we demonstrate how to make Joomla redirect to a different page if the rules succeed.
|
|
See Recipe
|
|
Number of days since first registration |
75
(2 votes, average 5.00 out of 5)
|
Recipes - MetaMod 1.5 -
General
|
|
This recipe can easily be customised to show people new modules based on how many days they have been registered. You may want to progress your registered users through a rolling programme of advertising / instruction etc. e.g. for the first week after they register show one module, then another for the next week, and another after that.
|
|
See Recipe
|
|
Control modules based on article category |
68
(12 votes, average 4.42 out of 5)
|
Recipes - MetaMod 1.5 -
General
|
|
With these recipes you can make modules appear/disappear when an article from a specific section or category is shown. They even detect section/category blog/list pages and will show the module on those pages if the section/category matches.
|
|
See Recipes
|
|
Select modules based on the group of the user |
67
(11 votes, average 3.64 out of 5)
|
Recipes - MetaMod 1.5 -
General
|
|
Use these recipes to make module selections based on the user group of the logged-in (or not logged-in) user. This can be particularly useful for hiding various modules for users who have already logged in.
|
|
See Recipes
|
|
Change Joomla module based on browser detection |
66
(8 votes, average 3.75 out of 5)
|
Recipes - MetaMod 1.5 -
General
|
|
Don’t tear your hair out if you can’t make one of your modules display correctly on Internet Explorer. Just design an alternative (simplified) version of the module, and use the following rules to display different modules for IE browsers. You can just as easily detect other browsers such as the iPhone and present different information just for them – or hide modules to suit the smaller browser.
|
|
See Recipes
|
65
(4 votes, average 5.00 out of 5)
|
Recipes - MetaMod 1.5 -
General
|
|
It’s easy to randomise your modules in Joomla – just set up MetaMod with the following PHP rule, and customise the “return” numbers to match the ids of the modules you want to use. Add more as appropriate.
|
|
See Recipe
|
|
<< Start < Prev 1 2 Next > End >>
|
|
Page 1 of 2 |