Im still relatively new to Joomla component development.
I have a component that manages rsvps to events.
In the administration side you create various events and specify the details of when where and what time the event starts etc. Each event has an eventid.
In the frontend I want to be able to show a specific events details when a menuitem is clicked.
In Joomla administration, my thinking is as follows:
1) Go to Menus->Top Menu
2) Click on [New] to create a new Top Menu Item
3) My component is listed there as MyRSVPComponent
But when I click on it, nothing happens??
All the other default components like search have submenus that you can click on that takes you to a Menu Item page and you are able to configure the Basic Parameters on the right hand side.
I want my component to behave like that as well and I want to be able to pick the event from a list that I want displayed for that menu item. How would I go about doing this?
Please do note that I have not followed the Joomla 1.5 MVC structure for my component.
Can I still make this work, or am I forced to create the project with the MVC structure.
I have my reasons for not wanting to go with MVC for this particular project so please do not just suggest that I go MVC unless that is the ONLY way that I going to achieve what I need to do.
The options you see in the menus are controlled directly by the views in your component. You will need a view for each menu item type you would like to have. You don't have to go MVC but it would certainly make life easier.
I just came across this question with the view to integrate a Symfony project into a Joomal component. Naturally I don't want to use the Joomla MVC for this as well.
I have done some debugging on how to create your menu links:
You need to have the link field set for your component, matching your component folder
You need to have the views folder, matching the "option" field value of your component database entry
As soon as you have this, the menu manager is going to show your views as options
To have specific view sub options, you need to create /com_yourcomponent/views/yourview/layout.xml, copy these from com_content. In there you can also define your menu options.
Related
I want to develop a joomla 2.5 porfolio extension.
So I need something in the backend to enter a couple of details.
On my frontpage I want to have listed the six latest projects and there will be a page in the frontend where all projects are listed.
I'm new to this whole joomla thing. At the moment I'm reading through the joomla docs and tutorials.
I'm a little bit confused because I'm not really sure which type of extension do I need.
Can all this be done with a single component or a module or do I have to mix both?
Because what I've understood so far a component can just be displayed as a independent page.
And a module has to be included in a page. Like {lastSixProjects}?
Can some please enlighten me a little bit?
If you want to create a page with portofolio only, you may create a component without a module...
If you want to put your portofolio in eg.: articles pages, search page, in a sidebar etc (like a image slideshow plugin) you must create a module (with a component assigned to it)
Please read this: http://docs.joomla.org/Extension_types_%28general_definitions%29 .
I undestrand that you want to put your portofolio in your front page... in this chase you MUST create a module.
Little explanation:
A module is an extension (similary to boxes, or widgets) that are arranged arround a component (in this chase com_content - on your FrontPage). Eg: Ads Module, Search Box Module etc.
A component is a super complex extension (similary to mini applications). It has an administration part and front-end part. All Joomla! pages loads a component. Eg: Content component, Search component etc.
I hope this will help you.
You want a component. Please read this: http://docs.joomla.org/Extension_types_%28general_definitions%29
Agree on 2 previous answers, you need a component with at least one table to store your projects. Then you need to link to a menu a view of the elements on a table. You should be able to make it work in 15 minutes with this component creator for Joomla http://www.component-creator.com/
I am working in Joomla 1.5 and have an article that I don't want listed in any of my menus. It is a special promotional page that exclusive people will be given the link to. Is there a way to give the article a pretty URL?
Currently the URL that works is /index.php?option=com_content&view=article&id=35. I would like that to be /15k.
Anyone help me?
I have seen this question, but the URL isn't quite what I'm looking for.
To get that URL you will need Joomla!'s SEF/SEO settings turned on (I'm assuming you've already got that setup).
In Joomla you have to create a new menu, call it something like "Utility Menu" but don't give it a "Module Title" - you don't want to display this menu so you don't need the module.
Then create a "Single Article" menu item with the alias 15k as a menu item within the "Utility Menu". You should now be able to access the article at the http://www.yoursite.com/15k
If you want to link to this from another menu create a menu item alias and point it at the 15k menu item. If you want to link from within an article simply point the link to the 15k menu item.
[Edit]
Routing in Joomla! first looks through the user defined paths (i.e. menu's and their menu items) then if it can't find a match for the requested resource that way it asks the particular component to build the route and if the components router is basic (i.e. nearly every single one in Joomla! 1.5) then you get the ?option=com_somecomponent&id=X style result. In 2.5 this is much improved but still uses the same routing mechanism.
I have created a simple basic component in joomla named, careerform so I want to know that what will be its url? Will it be :
index.php/?option=com_careerform
or in sef it will be something like:
index.php/components/careerform
or it will be like this while using .htaccess
/careerform
Is it true or what are joomla default URLs with different settings? Please tell what you know.
thanks for your time.
While what you are asking to do is possible, it would be rather complicated to rename a component. As part of the renaming you would have to update the names of dozens if not hundreds of classes throughout every file of the component. Very likely to run into some bugs because of this.
The far easier prospect is to just avoid these types of urls in your site. Joomla will only fall back to that style of url if a menu item does not exist for the view. Because of that, you can make the url into this:
http://sitename.com/any-component-alias/
To do this, go into the menu manager and create a new menu item. If you don't want this as part of the main menu, you can create a new menu. (I typically have a menu called "Hidden" for menu items that I want aliased but don't actually link to throughout the site from a menu.) When creating the menu item, make sure the type matches the component and view. The alias will then be whatever is entered in the alias box just below the title.
The one issue you may run into with this is that a component may not have a menu type for a particular view. In that case, you you would need to add the necessary metadata.xml file to the view (which again would be much easier than renaming the component!). A good tutorial for that can be found here: http://docs.joomla.org/Adding_view_layout_configuration_parameters.
yes if SEF will be enabled then index.php/component/careerform will be used.
You can create custom URLs by developing a router for your component.
There is very good documentation for it here.
I'm trying to write a slideshow for joomla. Specifically one that will be placed next to an article (no necessarily associated with the article though). Should i write a component, or a module? OR should I write a component that is placed in the page using a module (like the com_banner and mod_banner stuff in the joomla basic installation).
I know I am reinventing the wheel, but I really want to learn about joomla modding.
You want a module. You can assign modules to any menu items.
Modules will appear on that page and "sub-pages". For example, if you assign a module to a menu item that points to a "Article blog layout", then it will appear on that page and the articles linked from it.
If you only want one specific article, or any page without a specific menu item, create a new menu called "hidden menu" and make a menu item in it. Menus don't appear unless you publish the menu module.
By the way, there are many slideshow components for Joomla already out there - Photoslide from gavick.com is pretty good, and free.
If you want to associate the slideshow to a specific article i think you should write a component, because in this way you have more control on the article and you can manage its structure and its layout.
Hello I'm building my own PHP MVC framework. Not with the intention of using it. But I'm trying to learn PHP5 OO and the MVC design pattern.
I've read a lot of tutorials and got the basics working but now I'm stuck since things are getting more complicated.
My framework uses the following URL structure: /controller/action. Optionally followed by an inifinite number of variables, e.g. /product/view/1.
So far I got two separate controllers: page and product. I wan't to include them both in a single menu. I'm trying to establish the following menu structure. The corrosponding URL is between brackets.
Our company (/page/view/2)
Werkwijze (/page/view/3)
Staff (/page/view/4)
Our products (/product/index)
Bread (/product/category/1)
Banket (/product/category/2)
Cake (/product/category/3)
Contact (/page/view/5)
So basically I got a main menu and a sub menu. There are a few requirements I defined for the menu class:
The current item should have a different CSS class in the menu.
If the current item has a parent than that should have a different CSS class as well.
The menu should be expandable using all kinds of content a URL's.
And for bonus points: when I select a product from the Bread category. Let's say /product/view/1; then I'd like the 'Our products' and 'Bread' menu items to be highlighted as well.
I've got a copy of my 'framework' running here: http://www.eriknijland.nl/stackoverflow/. The content is in Dutch though and the menu is just static HTML.
The source code is available for download as well in the folder:
/stackoverflow/source/framework.zip
/stackoverflow/source/framework.sql
Any other comments on my code are welcome as well :P.
All the code to build that should be in the view layer of the application. Of course, the framework should provide methods to know wich module and action are active, but the behavior of the menu should be implemented in the application and not in the framework.
Another option would be to design the framework so that it provides some helpers to build menus automatically. In this case, everything should be implemented within the view layer of the framework.