My database is like below
Menu I'm willing to create is as below.
What I want to do is create a Joomla menu as shown above depending on the table rows in a table. If I add a row to the table, automatically menu item should be created.
EG: there are 3 rows in the sports table. So three menu are created as shown.
How can I do it? Given that I know how to retrive data from the database. I can get the list of sports and what I don't know is how to put then as a menu.
Ok, remember that Joomla is a content management system so for things like content and menu items, it's all done through the admin backend.
So, in the admin backend, go to Menu Manager and select the menu you want to add items to. Then create a single menu item called "Sports", and set the type to "text separator". Then create you 3 sub menu items (Sports 1, Sports 2, Sports 3), set the type to whatever you wish, and set the parent to "Sports"
Hope this helps
If you are going the dynamic way then this table might not be sufficient for your menu. You will have to add another column known as Parent which indicates id of parent term.
And you can use jQuery to automatically append data fetched from database to existing menu code on the fly or dynamically.
n the Joomla framework, components are executed using menu items. If
you go in the menu manager of your Joomla installation a HelloWorld
menu item type does not yet exist. Adding this functionality is easy
in Joomla. Simply put a site/views/helloworld/tmpl/default.xml file
containing:
Read more
Related
Building a web site with a data list (or directory) with some entries having more than one title. The entries need to appear in the list for each title. The list needs to function similarly to Linux's symbolic links where there are more than one directory entry pointing to the same data. Are there any recommendations on how to do this?
Tags (in Articles) were invented for that.
Or Custom fields. Or a CCK. It is about a Many-to-Many relation, or One-to-Many.
Please specify your needs: what is the difference between your "entries" and your "titles"? What are they?
One option may be to store the data in articles and create multiple menu options pointing to the same article.
A hidden menu (one that is not displayed explicitly on the website) can be created if there's no need to display the information in a menu.
You can configure the menu items to display the menu title as the page heading (rather than the article title) if you wish.
Menu items matching a search term will show up in Joomla search results.
Joomla does not offer any option to automatically sort menu items in a menu automatically but you can probably find a third party menu that can do this e.g.
Art Responsive Menu (free) looks like it has an option to sort by menu title.
I'd like to display n modules when the users click on a menu entry. Is there any way to do something like that ?
I could use sub-menus but I'd prefer to have 1 module for the "hot topics" of the menu entry, 3 or 4 modules for sub-categories of the menu entry and a last module displaying all the articles corresponding to the menu entry.
More precisely :
(sorry for not being clear and the line breaks.)
I have a category with sub-categories. Some of the articles are tagged as "HOT".
I want that when they click on 1 entry, users see :
- a list of the articles tagged as "HOT" (I have a module which do that)
- a list of selected sub-categories and the articles they contain presented as a table of content (I've got a module which do that)
- a list of all the articles.
When I create a menu entry, I can only select one type of content (category blog, category list etc.). Wrong ?
Thanks for your responses
jc
Got it !
Go to Extensions -> Module Manager.
Edit each module you want to be displayed and go to Menu Assignement tab. In the Module Assignement pulldown menu, select "Only on the pages selected".
A list of all your menu entries is then displayed, you just have to select/deselect according to your needs.
Hence you can select as many modules as wanted to be displayed when users click on the choosen menu entry.
Cool !
I have an article (with the id=6) on joomla 1.7
I have the main menu. In that menu, I created the item that show me only one article, the article with the id=6.
I have a secondary menu, that have 3 differents items. One of them, I have to link it to the same article with the id=6.
The problem is, that I need to add the "current" id to the item at the main menu, and in the item of the secondary menu, because both are links to the same article, so I have to highlight them.
By default, the system add me the current id to one item only when I click on that item, and doesn't when I show the same article that the item links.
Any help? thank you.
What happens if you change the second menu item to the type of 'Alias' and select the original menu item in the right hand side options?
Now instead of having two menu items with different internal menu ItemIds you have two items with the same ItemId. As long as your css is correct they should both be highlighted (or should that be highlit?).
I need an advice ...
I'm using joomla 1.7.2.
I want to plan a site, the site should be very hierarchical.
Actually it will contain categories and sub categories and sub categories and ... And finally all relevant articles that will be under the sub-sub ... Category that was selected.
My ambition from Joomla is to create a main categories menu that looks something like that (never mind the graphics at the moment):
menu example here
Clicking a category will lead to the same look a like menu with his sub-categories.
I guess you could create an article for each category that will contain a menu that will display the relevant sub-categories. but it seems incorrect.
Is there a more correct way to build the hierarchical structure of the site menus?
Sorry about the long text.
I would appreciate any response.
Yoni.
Seems like you are going to make your users click a lot of links to get to the content. How deep do you plan to go? You might want to look in to one of the many mega menus to make it a little easier to get to what they are looking for.
In any case, the basic functionality you are looking for is built in to the core Joomla menu. First, you would need to create a single menu with the structure you described. Link the parent menus to the Joomla category. The trick is in the parameters of the menu module. You will need one menu module for each level of categories you have in your hierarchy. Each module will need to be assigned to every menu item on the corresponding level and the start and end level parameters will need to be set to one level below the current level (0 being the root or top level). You will also want to have sub menu display turned off.
when you click through the links the menu will only display the child menus of the current menu item you are on.
If you want to create an hierarchical menu in Joomla you have to "split" the menu in different parts. Please follow these tutorials:
TODO: Creating a split menu in Jooma
Video TODO: Joomla's
Split Menu System
I have 2 modules on my home page. One lists most popular, one lists most recent k2 items from 2 different categories, video and blog. The links to the blog entires go to /blog/item/, so the side bar modules are being displayed correctly. But for some reason the video entries are linking to /component/k2/item/, and on that page the modules that are supposed to on the right do not show up at all. The content area takes up the entire width of the site.
What is further confusing about this situation is that i have duplicates of those modules running on certain interior pages, with the same settings, that link to the items correctly. The only reason i have 2 of the same module is because i need that same module to display below the content on index page, and in the side bar on select interior pages.
I do not have a menu item that links to the video category. The main category is Education, and there are 3 sub categories. blog, video, article. There are only menu items for Blog, and for Education. I already have that same module in the some of the interior pages, and it works fine.
what am i doing wrong?
The solution is pretty simple, the explanation is rather complicated. Here is the solution -
Create a new menu, call it hidden links or something. Doesn't matter what is it called, you will not display this menu on the site.
Create a new menu item for the video category.
Assign your modules to that hidden menu item.
If you don't care about what is happening, just know that you can always create hidden menu items to control layout on pages.
If you do care, get a cold drink and get comfortable...
Menu items in Joomla server several different purposes other than providing links for users to get to content. If you are using the core SEF URLs, this is the first place Joomla looks to create those URLs. In general a URL is built like this - joomla install/parent menu item alias/sub menu item alias/content item/article alias.html. Since your video category does not have a corresponding menu item to use for building URLs, it uses the default URL scheme.
The menu item is also the source for the itemID that every page uses. If a particular page does not have a related menu item, it will inherit the itemID from the previous page usually or in the case of k2 items/joomla article it will inherit the itemID from the menu item that links to the parent category of the content. The itemID is used to determine module menu assignment. This is why getting to a particular page that does not have a menu item 2 different ways will often give you pages that look different, different itemIDs were inherited resulting in different modules being displayed.
Since Joomla really counts on the itemID, you should always specify a menu item for any content you are diplaying, even if you do not want to display a link in the menu. By creating a menu that does not appear in a module, you still get the itemID you need for the content, but the menu never appears anywhere. Usually, a link to a category will be enough since child content will pick up that itemID, but in some cases it makes sense to create menu items to specific content items/articles. You would do this any time you want a specific URL for an item. For example, if you wanted to create a URL like your-site.com/special-offer, you could create the content item for the special offer, then make a menu item with the alias special-offer to get the correct URL.
Joomla also uses the menu item for browser titles and page titles. Your question is not related to that so I'll stop here, but as you can tell it is pretty important to know when to create a menu item for your content.