i have been searching around the internet for a while and cant get any idea of how i will be able to show the module database id as html attribute id without dealing with the template files.
My first idea was to make a plugin that adds this function to each module loaded but i dont think that is the solution anymore.
I hope some of you can give me some ideas of what methods i should use and if it is possible to do this in some way.
Thank you for your awnsers.
I'd look into creating what's called a Custom Module Chrome. To do this does involve creating a file within your template, however.
Is there a reason to not work on the template? The only valid one I can think of is if it is a third party one that gets patched.
Related
I am to develop a Joomla 3.1 Template. The template should consist of a static header and footer, as well as multiple pages, all of which need their own styling. Further, the client would like to be able to add 'events' to a specific listings page. Customers should be able to book said events via a simple form.
Thanks to some really basic guides, I have the header and footer down, as well as some simple template options. However, I am now running into some problems;
How would I approach the content section? Ideally, a page would consist of multiple, editable sections. The client would be able to edit said sections in the backend without having to deal with or accidentally changing the layout or styling of the page itself. Since there are multiple pages, I obviously need different views/containers for each of them. Is this possible and if so, how?
Another problem is the documentation, which I found to be very lacking. Even google only got me so far (basic structure, index.php, templateDetails.xml and so forth). Are there any other resources I may have missed or do I really need to refer to other templates (most of which, obviously, aren't free) and use var_dump all the time?
Writing this, I just realized that I could theoretically build a template for every single page but ... that surely can't be right, right?
If someone could provide a basic outline or at least tell me how you personally would tackle a project like this, it'd be very much appreciated.
All the best
Edit;
I just found some video tutorials but since my bandwidth is limited, I cannot watch them. Please take this into account when writing an answer. Thanks.
I have only one word for you :
GANTRY :D
gantry-framework.org
Joomla revolves around menu items that point to components. For each menu item, you can assign modules to different positions within the template to create a unique page. You only need one template if you really understand how Joomla templating works.
Joomla has very good documentation here - http://docs.joomla.org/
Few things to remember -
Component - this is a type of content or app of sorts. A component will define what content is and how it is displayed. This can be anything from blog articles and categories to an event registration system to a message board or social network. Menu items generally will point to a view in a component.
Modules - these are used to display additional content around the component output. This can be a menu, or a login box, or a weather widget or anything else you can come up with. Modules can be assigned to or excluded from the various menu items on your site.
Plugin - plugins are used to change the final output on a site. They can be used to insert Youtube videos, or forms within content, or even to alter the meta tags on a page.
Understanding how extensions work is an important first step. Once you get how those work, learning how templates and template overrides work will give you most of what you need to know to build a basic Joomla site.
I'm having major problems with this. Basically, I need to add a "url" field to the event management plugin with wordpress. My client wants to be able to add a url to their event so it can be clicked and viewed for more information on the event. I've looked through everything and im having problems understanding the wordpress file structure. I tried to add my own field to the event editor, database and front end but i dont know where wordpress posts the data to so i cant receive the variable. If i could get the variable, i could probably figure out how to use $wpdb relatively simply. but for that matter, i dont know where i should use that. where is the file that makes all those calls? i shouldnt have a problem getting the data from the database.
Edit
My problem, as described, was solved by installing another plugin called PODS. the only solution to adding functionality to a plugin, as in other fields, is to write your own plugin (as far as im aware). PODS solved my problem. It allowed me to add another field to the front of the event management form and saved it to the database. I still had to retrieve it from the database and display it on the front myself with php, but it was a much easier task than i expected it to be. If anybody wants to add extra fields to a plugin in wordpress, PODS is what i'd suggest. It's also free.
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.
Greetings all,
I just wanted to know what is the proper way to do template's in Joomla?
If i have four boxes in footer (4 columns) how can i automate them in the template so their content inside can be managed from the back-end?
So far, i have seen custom html block modules and using those. But wouldn't it be funny if there are loads of such blocks and than managing them from modules individually?
Now suppose if i have a slogan/tag line for my website; and i want it to be managed from backend.. Do i need to create that custom block even for such single line?
May be i am going to wrong direction. Can someone guide me please?
Regards,
Jhon.
A Joomla template is simply a map the outlines the various positions that available to put modules in. These positions are built around the component display area. You can load basically anything you want in to a module position. You will probably need to download some modules from the Joomla Extension Directory, there are tons of options.
The Custom HTML module is appropriate for simple content that is not going to change very often. This would be good for a company tag line that doesn't ever change. There are various modules that would allow you to load content from the latest Joomla articles based on section or category. There are modules for login forms, stock prices, RSS feeds, weather, all kinds of stuff.
I have some joomla articles. some values in that article has to be updated by data obtained through a soap call to other site. Is there any plugin available for joomla by which i can embed custom php inside articles?? How can i do this.??
To me, the ideal way is to create a traditional component that gets all the data. This component inserts these values in specified article ids. These articles act as "data containers".
Why create a traditional component? Because you'll be going to use libraries, error corrections and such and a component solution can be more robust. IMHO it's a good idea to avoid php logic in your editor panel.
Then, in the articles that are shown to users in the frontend, using Include Content Item Joomla Plugin, you add {include_content_item 123}, being 123 the id of the article you inserted data you want to show in your component. Doing the {} call outputs the article which id is "123".
Check out the Joomla plugin repository for "custom code in content"
Good luck!
There are a lot of such component, they are more or less the same.
I use Sourcerer, but pay attention as version of php is crucial sometimes.
http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/custom-code-in-content/5051
Allows to insert php/js/css code to articles and modules.