Joomla conditional pages and menus - joomla

I'm trying to make a "Chapter selector" for my organization's website. I want to be able to select, say, the "Bay Area chapter" and have the site display articles and events for the Bay Area chapter (while keeping the chapter-independent parts of the site the same). How do I accomplish this?

I'd need a little more detail but here are some of the things to consider -
I am a fan of K2 for being able to nest categories, but you can at least categorize all of your Chapter information in to separate categories within a single section in the Joomla content manager.
For each Category you will need a menu item - Articles > Category > Category blog Layout
In the module manager you will need corresponding modules that display category related information. Be sure to associate the modules to the correct menu items in the module's Menu Assignment area.

I'd do the chapter selector as a menu. Create a menu to contain your chapters and then publish a module for that menu which allows you to pick your items with that chapter.

Related

Joomla category list issue

This is difficult to explain but I'll do my best.
I have a site with a number of articles grouped into different menus, which allows me to present relevant content to the visitor depending on what they are interested in. Each article may be in a number of menus.
I have also categorised each article based on the menu that it is most relevant to. I have done this in order to create a landing page using the category list component.
The issue I have is that the urls in the category list output do not relate to the active menu, when the article is in a number of menus. When you click on the article it takes you to the different menu. This issue is fixed if I unpublish the article from all other menus. I understand this is because Single article menu id takes precedence over category menu id's.
I need a fix that selects the active menu id rather than the default.
Any help appreciated.
Joomla cannot do what you want to do by default. In short, you have multiple URLs for each article and you want Joomla to automatically know which context that article is displayed in in order to display the right URL. Joomla can't do this.
What you need to do is that you want to override the layout module for that category and create a code that will get the right URL based on the context you are in. Not a very easy thing to do but this is how it should be done.
Note that there are some extensions, such as flexicontent, that allow articles to be listed in multiple categories, and that will handle such URLs correctly depending on the context.

Confused between Joomla Alternative Layout and Templating with K2

I am really confused about these 2 concepts. I am basically wanting to change the appearance of the Joomla category page that lists the sub-categories in it. I dont like the default "Alternative Layout" options of Blog and List type. I want to show the sub-categories with an image + sub-category title style similar to some Portfolio layouts I've seen. So I started googling and reading a few docs on how to do this. During this time, I came across the Layout Overrides in Joomla which says that we can create alternative Joomla Layouts to display Modules, components, Category and Menu Items.
Q1) So does this mean that I can create a new layout (for portfolio category as an example) and if I place them inside "templates/myTemplate/html/com_contact/category" folder this layout option will be listed under Alternative Layout drop-down list in admin panel?
While I was reading some more, I then came across the K2 method where it says that K2 allows creating sub-templates to have different styles for each categories. I havent decided if I am going to use K2 or the core Joomla articles. But my main concern is to style some category pages differently to the default blog or list options. When I read the above article, I thought this can be done in Joomla core itself. But when I read the K2 article on Templating with K2 (and the concepts of sub-templates), it said that the core Joomla doesnt allow sub-templating and K2 can do that.
Q2) What is the difference between creating sub-templates for K2 categories and creating custom template layouts for Joomla categories?
I am totally confused here. If Joomla allows to create different layouts for categories which can then be chosen from the admin panel on what layout to use for that category, what is so special about K2's sub-templating which claims that only K2 allows the flexibility of choosing a different layout for different categories?
Can someone help me understand this please? I have been searching to understand the difference for several hours and I am still stuck on this...
I am new to Joomla and I am using the Joomla version 3.3.
There is a big difference in Joomla core Alternative-Layouts and K2's approach. Hard to explain in theory...
Joomla:
The core feature offers two choices: Either create Alt-Layouts and assign them to each Category and (each!) Article in Backend. Or with a new, alternative MenuItem. The latter is achieved through an additional XML file with same name and location. As long as you work with Categories and Listings, the result is quite similar. But it is different when it comes to the Article Fullview: You won't get an alternative layout for full view automatically! You have to assign the layout in backend or use 1 global setting from the article options. The latter will only apply to articles that have no respective Alt-MenuItem. This can result in a "chicken-egg-situation". AFAIK, frontend submission requires an alternative MenuItem for each edit-form. You can't get an alternative full-view layout when you click on a blog/list item "easily". The links from your category items still lead to the "default" without extra work. In my experience, full-view layouts are displayed in the following setups only:
Alt.MenuItem (XML) for Category and Article. A MenuItem for each article has to exist, to automatically pickup your alt.Layout.
Alt.Layout assigned to each Article. (manual work)
Alt.Layout set for Category (no XML). Only 1 global setting in Article's manager options.
K2:
The layout folder structure is simpler. All layout files live in the same folder, you just rename that container folder. e.g. products. The inner files keep their default names. This results in an easier and automated "workflow". A layout is assigned to a category and/or its sub-categories. Article full-views pick up their layout automatically, due to the file/folder structure. There is no difference between frontend/backend. No manual assignment on article edit is needed. Nor single K2 items in the menu. (not to mention, that you get extra fields per category)
Hope this helps.

Configuring modules for when an article is clicked in a category blog layout menu (Joomla 2.5)

Suppose I have these three modules:
main_menu_module (linked to a menu that has a Home Page link, and a Sport articles Blog Layout link)
module1
module2
The module main_menu_module should be shown in all pages (which is OK).
I want that:
module1 be ONLY in Blog Layout List of Sport category, not when a single Sport article from that list was clicked.
module2 be ONLY in single Sport article from that list, and NOT when the Blog Layout LIST was shown.
Now the question is:
Is that possible at all using Joomla? Even if that is not, no problem. I just want a link proving this fact.
Please ask me if my question is not clear enough.
Your question is clear and makes sense. This can be done in Joomla, but it requires an extension. Basic Joomla will not do this because of itemID inheritance. Any content item that does not directly have a menu item inherits the itemID from it's parent so a module assigned to the sport category will also display on the individual items in that category.
In order to solve this issue you need to install Advanced Module Manager. This allows you to have much finer control over where your module display, such as including or excluding child items when determining whether the module should display.
http://www.nonumber.nl/extensions/advancedmodulemanager

How to create a hierarchical Joomla! menu structure

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

URLs in module not pointing the correct category from index page

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.

Resources