Add a module to a component , but not every page of the component - joomla

i'm working on a joomla 1.5 for a university project (when it started 2.5 wasn't out :D). What i'm trying to do is to assign a module to my custom component , but not every page of it.
The 2 different pages of my component is a page that shows every product , but the other one needs an id to work. In order to assign the module just to a page i think i need to assign every page my component has to a menu item.
But my problem is that i don't know how to assign my page that shows a specific product the variable id to make it work.

The Joorthodox way, i guess, would be to control the module availability from the module manager in administator page, where you can assign it to certain pages/menu items only.
Thus summarizing, create a menu item type for that page assign it to a menu item which in turn will be your module control switch for that page.
Another approach could be a control directly to the joomla module renderer. An example can be found here: joomla-is-there-a-module-render-plugin-event

One method would be to set the module to be hidden on that page using CSS.
Go to views/view_name/tmpl/default.php and within the tags at the top, add the following code in:
$doc = JFactory::getDocument();
$doc->addStyleDeclaration(" #element_id { display: none; } ");
You will need to inspect the module using a tool such as Firebug, Chrome Dev Tools or another tool depending on which browser you're using, and change element_id to whatever suits your needs.
Hope this helps

Just use Advanced Module Manager and assign your module by URL's not just by the menu link, it works for me to hide and show a module inside the different pages of the same component

Related

Module assignment in joomla 3.0

How will we assign a particular module for particular page in joomla 3.0? I have no particular menu item for that page?I know that if i have a particular menu ,then assign that module to that particular menu item,but i dont have menu
This is not possible:
You cannot assign a module to a URL link. This is because URL links do not have Itemids assigned to them.
You cannot directly assign modules to pages that are only linked via
content (for example, a link from one article to another) or other,
non-menu modules (for example, a link to an article from a module),
because these also do not have Itemids. One work-around for this
problem is to have an unpublished menu that contains links to the
items you wish to link through non-menus. This will create an itemid
that can be included in the url you link to.
Source: Joomla Docs
In only case that this page is an article or a component that you could load content via plugin you could use loadposition / loadmodule method.
Here is the official documentantion how you could do that.
Hope this helps

Template not displaying correctly

I've just had to reinstall Joomla as the template didn't seem to display correctly.
It should look like this demo
http://demo.joomla-monster.com/190-jm-lifestyle
But it looks like this.
www.ultimatemuscleperformance.co.uk
Does anyone have any idea why?
I'm really new to Joomla but I thought all of that would be displayed by default
*strong text*The template you've installed probably uses different named module positions to the template you were using before.
For example, lets say you assigned a login module to "position-7" (right sidebar) on your first template, you then install this new template. The module won't show because the new template uses the name "right-column" instead.
Here is a map of the module positions your template provides:
http://www.joomla-monster.com/knowledge-base-area/templates-documentation/templates-for-joomla-3-0/jm-lifestyle/template-layout
So all you need to do is assign the modules that aren't showing to a position shown on the link above
Hope this helps

How to add a menu to login form module in Joomla 1.7?

I am intrested in changing the joomla default Login module to show a menu as a greeting in the login module,
so that menu will contain links for profile management and stuff from that sort.
I have tried to add a module position inside the module (dawg!)
But that went down the drain.
And i'm not intrested in adding manual links to pages because they might change.
Any ideas guys?
Thanks in advance,
Eric
put this code in login module template where you want to show the menu
$module = JModuleHelper::getModules('xxxx');
// xxxx is any virtual position, no need to create it anywhere.
echo JModuleHelper::renderModule($module[0]);
and enable a menu module at position 'xxxx'.
I hope this will work.
You are going to have to create a custom module to do that. There is no way to do it with the parameters you have given. You could use the module alternative layout to add in some links to the login module, but you can't add a menu to it without rewriting the entire module.

How to create multiple module instances in joomla 1.5?

I have installed joomla module. It seems that I can only display the same module with the same configuration on any page.
How do you have this same module, with a different configuration on different page ? (I do not want to display the same rss feed under each joomla article)...
Is it possible to have multiple "instances" of a module ?
I have taken an rss feed module for example, but I could have taken any joomla module.
Thank you for your answer
Frd...its easy..
Pls follow my link:
Administrator--> Extensions--> module manager-->Select ur module(Which module u need)-->click new Button (in top right menu)-->here u got all module (select ur required module)--> now u can get it...!!! pls check it..!!
Modules can be assigned to specific menu items. In 1.5 you have the option to assign a module to All, Selected, or None menu items. Simple make multiple copies of the module you want to use then assign each version to the menu items you wish with the associated variations in configuration.
You can create multiple instances of a module through module manager in Admin side of your site. And different instances can have different configurations.

In a custom Joomla! template, how can I determine whether I am on the home page?

I am trying to create a custom template, but I want the template to look a little different for my Joomla! homepage/frontpage. Is there a easy boolean-type expression I can use to determine whether I am on my site's homepage?
That way, I can just say if ($on_homepage) { [custom homepage html] } else { [regular template] }
Thanks in advance!
You can create a separate template for your homepage. More details here.
This is very easy, just create 2 templates. One for your homepage and one for the rest of your site. Then install both, make sure you give them a descriptive name in their xml file so you know the difference.
Once they are installed you can set a default template that would be site wide. Then choose/click on your homepage template and it's options will load up. On the bottom left you can select the menu items where this template will be visible. This setup is very much like the way in which you define where modules are shown.

Resources