How to use Joomla left sidebar position for a custom component menu - joomla

A client web site uses a Joomla template with lots of modules in the left column, but for the custom component I'm designing, those modules must be replaced by a vertical menu. The hack solution I came up with is to hide those modules with CSS:
div#leftpad > div {
display:none;
}
and then insert a <div id='compmenu'> in <div id='leftpad'> with javascript and set display:block. With jQuery, I could do
jQuery('#compmenu').appendTo('#leftpad').show();
The component displays a google map, so javascript is required anyway. Any Joomla experts here know of a more elegant or straightforward method to achieve the same result?

Why don't you use the build in Menu-Bind for Modules to hide them when your Module or Component is displayed, this would be a clean way. I think your Module/Comp is bound to a Menu item.
Edit:
For sure your client have to implement your Module/Comp the right way. Is is very bad to do something like this with a hack.
Create Menu-Item for your component (programtic)
Create a hidden menu
Add your component to that menu
Do unbound all modules from this menue
The Joomla API hold a good series of Tutorials about building components. I gone through them in the past but as I see they have improved them. As I understand your component is relatively straight forward so the default menu should be what you want. It is described in the install XML
<administration>
<!-- Administration Menu Section -->
<menu>MyMenuLink</menu>
<!-- some other stuff -->
</administration>
And will be available at the Joomla! menumanager after your client has installed your component. So I think it will be not that hard for you.

In Joomla, menu types are determined by the various Views specified by the installed components. If your component is properly coded to Joomla MVC standards, you should have at least one View, which will give you at least one menu type to choose from. As sra mentioned, even if you do not need a menu link, you should create a hidden menu so you can create a link so you have an itemID to work with and assign modules to.
There are a few extensions and websites that can help create the necessary files for a component so all you have to do is add a little code. Once you understand the Joomla MVC it's really not too difficult.
http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1
Doing it this way will save you a lot of headache later when the end user has to figure out how to use your component.

Related

How to create a single page vertical scrolling site in Joomla

I can create a standard Joomla template in my sleep, but recently I had a client come to me who wants a vertically scrolling, single page site. I whipped up an HTML/CSS mockup that functions beautifully but I have a question re: converting it to a Joomla template:
Do I just create a single article in Joomla that contains all of the content for the single page, and then create menu items that link to the section divs?
Many thanks,
Cynthia
yes I think that good , also you can make all items in "index.php" in template folder and make menu items link to divs by "#" plus ID .
you can add all items you want as module and you can use component in modules plugin lik :
http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/embed-a-include/18121
Hope that help you
You'd be better to insert the content via creating a bespoke module or component - putting code in the WYSIWYG area kind of defeats the point of using a CMS at all - someone with no coding skills has to be able to update the site and not accidentally delete the layout.
I'd perhaps question why it needs it to be in Joomla at all, though. It doesn't sound like it will be benefiting from many of its features.

Adding an Accordion within Joomla Component Options Screen

Is it possible to add an accordion to a Joomla 3.x component's options screen, similar to what is presented in Joomla's menu or template parameters screens?
If so, how does would one structure the config.xml file?
Example illustration of what I am trying to achieve:
Com_config manages that view and it pretty much expects a standard structure. You might be able to do a layout override for it as long as you don't break the other extensions. You could for example make it conditional on the option being your extension.

joomla 3.1 ajax module

ok so I have a main horizontal menu that appears on all pages, (company, products, about us) and I want another menu, (vertical accordion on the left side of the page) inside products:
phone
--samsung galaxy s4
--iphone 4
pc
--hp pavilion
--toshiba
and when I clic on any of the sections of the accordion menu the information about each product appears on the right using ajax. I have made the accordion menu as a custom html module and the same with the content that its supposed to appear on the right side (I used modules instead of articles).
Now I'm thinking that its probably better to create another menu for the accordion and that the content should be articles, but I dont know how to make it look like an accordion, and I still need help using ajax to show the content of each product.
the main thing is, I want to use ajax to replace one module for another when I clic on any section of the accordion menu. is there any way to do it, all I could find in google its how to change the main article of the page, for that i have to replace
jdoc:include type="component" and add an event with the url but that replaces everything and I just want to change the right module/article
something like this
I dont know if I explained myself well.
I used shaper helix 2 template
Any help would be appreciated.
Check for some extensions here: http://extensions.joomla.org/extensions/structure-a-navigation/menu-systems/accordion-menus
An advice... you better forget ajax to load the catalog because as it used on the example the product pages are missed by search engines, as spiders and crawlers doesn't execute javascript. Try to search for that domain... results don't have any product.
Good luck!

Why my top menu dissappear when in register or reset page in joomla 2.5

I have created a custom joomla template based on blank joomla template from http://blank.vc/. Everything was fine until i clicked either forgot password?, forgot your username? or create account link that bring me to register or reset page in frontend but strangely the top menu was gone.
This is the screenshot :
http://i63.photobucket.com/albums/h145/affan2fly/menugone.jpg
i have no idea why this could happenned.
Please help with this. I appreciate all the help. Thanks!
The problem is because only on the pages selected option for module assignment is set. If you open a page which doesn't belong to any menu, then module won't be shown on it.
You can either check menu module to be shown on all pages, or make a new menu item for forgot password functionality, and then assign that menu for both menu module, and breadcrumbs module.
I don't know which Joomla version you're using and what you use for translation, but if you use Joomfish or Falang, language translation should be much easier.
If you don't use any of those, and you really need to leave everything as it is, then you can also detect current user language in the template, and load either one or the other menu module based on it. That way you can set module to be shown on all pages, and make sure it is displayed only for the choosen language.

How to have custom sidebar content per article in Joomla?

I'm in the process of porting an existing website to Joomla. Most pages of this website consist of a main content area and a sidebar containing additional items relating to the main content, such as (in-page) links, images, additional information, etc.
In Joomla, the main page content would probably be an article, but I'm not sure what would be the best way to create the sidebar content in Joomla.
Examples of pages-with-sidebar:
http://www.aikikan.nl/en_watisaikido
http://www.aikikan.nl/dojo?id=2
I'm creating a custom template for this website, so any solutions that require modifying the template are fine as well. What would be the best way to set this up?
Keep the content of each sidebar in an article and then assign it to a module by means of the article-as-module extension. You can then control the scope for each module (i.e. choose menu postions for which it will be shown) in the admin interface.
There is an extension called meta mod which is perfect for this sort of thing. It allows you to show modules based on any condition you can evaluate with PHP

Categories

Resources