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.
Related
So I'm a little confused by Joomla's Alternative Layout overrides.
I'm using Joomla 3.3
I have read all Joomla 3.x documentation, and have followed many tutorials without any luck.
So here are my template files:
Promo is the name of the alternative layout which I would like to activate for one of my Category Pages.
So it appears as an alternative layout without a problem.
Then I've gone ahead and made the menu item:
However when I go on the page, it calls the blog.php override only and not the promo.php layout
What am I doing wrong here?
Where is your promo.xml file? You should have one in the same directory where you have your promo.php file. The promo.xml file should be a copy of the blog.xml file located under the public_html/components/com_content/views/category/tmpl folder. You will only need to change the line:
<layout title="COM_CONTENT_CATEGORY_VIEW_BLOG_TITLE" option="COM_CONTENT_CATEGORY_VIEW_BLOG_OPTION">
to
<layout title="promo" option="promo">
And then when you create a menu item, choose its type to be promo.
To expand on #itoctopus, there are two different things, an alternative layout and an alternate menu layout. If you make a direct menu link you must use the latter. For this you need the xml file, and at that point it will show up in your list of menu options. Alternative layouts are applied to items and the do not show up in the menu options. The menu always overrides the item. There are some additional options you can play around with.
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.
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.
i need to add js to a specific page in joomla. How do i do that? I cant find any option to edit the html of each page, since i also have to add some little html. How does joomla do that? i can assign a template for a specific site but then you would have to do each change twice...
I need to add a javascript file and some html to one specific site. i read the wiki and googled but i dont get it...
The reason you couldn't find a page to edit is that there is only one page in a Joomla site that builds all the other pages based on the URL, menu ID, and other parameters passed in the query string.
If you only need the javascript on a single "page" then there are a couple of ways to do it depending on where the content needs to be.
If it needs to go in the main content area (the component position) then you should get an extension that allows you to put javascript inside a regular Joomla article. Then you can put what ever code and HTML you need in the article and link to it with a regular menu item.
If you want it to go in a module position, then you can simply use the Custom HTML module. If you turn off the WYSIWYG editor editor, you can put the javascript right in to the content area of the module. It does require the editor to be off though, otherwise the code will be evaluated and you will lose what ever you had in there. You can also limit where the module displays under the menu assignment selection.
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