Module assignment in joomla 3.0 - joomla

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

Related

Joomla article structure

I was a newbie in Joomla and using the latest version to create my website. I want to create news page (list of article). I'm using module (external plugin) to listing all the article. But I'm not understand the structure to create the pages.
I got a menu like this:
Home
Latest News (link to single article with category 'Latest News')
This is my category:
Home
Latest News
News (every new article will be under this category)
Events
Then I display all the article inside Latest News page except the page I leave as blank because I using module to display the list. The URL will be like this mywebsitename/latest-news.
The problem is when I click one of the article to show full details of the article. The URL will be like mywebsitename/latest-news/11-home/latest-news/news/articleName. So how I need to do to structure the URL even my breadcrumb to be like this
mywebsitename / Latest News / News / article name
Even the module also display inside the article page. I only set this module under latest news page only. Can anyone help me. Thanks.
If you just began, restart your project. If you want to build up a site, first check whether there are any core functions for your usage or not. If it can be done through them, do it like that, as this is better for updating your site. (Maybe your plugin will not be supported later on...)
Then restart by building up your site:
Category - Article - Menu
Firstly, create the categories you wish. For example, you want the category "News" where you put news articles and a category "Events" where you put articles about your events.
Secondly create some articles for your category. You can use the "read-more" to preview your articles in your blog.
Last, create the menu. You can use a category blog and it's options to show your articles the way you want.

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

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

Why is Joomla 1.5 creating different URLs for the same articles on different pages?

I'm trying to understand the way Joomla (1.5) creates article URLs.
I created a module to display news. The module displays all the news, with correct URLs on the homepage mysite/component/content/article/xxxxxxxx.
I created a module to display the last article on the homepage and a button, see all news, linking to a menu item displaying a page with all the articles. The url is: mysite/news.
The problem is the URLs to the article are generated incorrectly as mysite/news/xxxxxxxx and they give a 404. How can I get the URLs to be the same as on the homepage?
Update: The new URL doesn't give a 404, it points to the same page as the menu, I mean mysite/news/ is the same as mysite/news/xxxxxxxx, it shows the list of all the articles and not the article itself
To create proper SEF URLs, two steps are needed:
Be sure to have a menu entry for each article in the list. You don't have to display that menu, it just has to exist. The menu entry's alias is used to build the SEF URL.
When creating links to such an article, be sure to include the parameter Itemid=n in the URL, with n being the id of the menu item. In article texts, use this structure:
index.php?option=com_content&view=article&id=23&Itemid=125
Joomla! will convert that into a SEF URL automatically, and it will still work, when you for some reason turn SEF off.
If you generate links in a module, the URL is not converted automatically. You have to call JRoute::_() for that:
echo JRoute::_('index.php?option=com_content&view=article&id=23&Itemid=125');

Create form like "Create Article" in component (frontend part) in Joomla 2.5

Anybody know how to create a form just like in "Create Article" in com_content component.
Basically i want to make a form in my component frontend part.
Your best bet will be to download a form module and embed it in the article.
Check these 2 categories to see which extension suits your needs.
http://extensions.joomla.org/extensions/contacts-and-feedback/forms
http://extensions.joomla.org/extensions/contacts-and-feedback/contact-forms
Once you have a module, give it a custom position by typing one in instead of selecting one, then go to your article and use the following code:
{loadposition xxx}
Hope this helps.

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.

Resources