I'm creating a module in joomla 2.5, I would like to fetch data from a component to a module configuration like what would happen to this one:
<field
name="catid"
type="category"
extension="com_content"
published=""
label="Category"
description="A content category"/>
I'm aware that this specific sample code from my module XML configuration file would able to fetch a list of categories from the component com_content, but I couldn't figure out where it's coming from, how does joomla do this? could I also enable my custom components to do it? if yes how? I'm not sure if this was asked before in this forum but I'm really having a hard time to figure it out if you could give me a link that will teach me how to do it that would be great. :)
When you create a component with it's various models, you can create custom forms for them as you're probably aware. This lets Joomla! do a lot of the backend form work for you - all you have to do is define the contents/structure for the form in a XML file.
Of course, Joomla! can't know about every data type so forms need to be extensible. To this end Joomla! provides support for custom form field types... these are defined alongside the forms directory in your model, in a fields directory.
By defining an extension and type value you tell Joomla! to use that specific extension's field type. So for your example field Joomla will look for /administrator/components/com_content/models/fields/cateogry.php
You can read more about "Adding a new field type" in the tutorial on creating a component.
Related
How to add a custom form to sulu CMS (example: complex contact form) and save values to database? Is there any good example? Documentation does not mention about custom development.
Regards,
As long as your forms are static (meaning the content manager is not able to choose which fields are appearing), you can simply do what is described in the Symfony documentation.
There are two (probably even more) different possibilities to include Symfony forms:
The first one is to create your own route and controller, working with Symfony forms as you would do in any other Symfony application.
The second one is to use the template system of Sulu as described in our documentation. Then you can add a few fields for content management around the form the content manager can use. In the template defined in the <view> tag of the XML you can again use Symfony form stuff. If you need any special information from the system you can even change the <controller> tag of the XML, to pass more than only the data from the content management.
There are also some ideas concerning a more sophisticated form manager floating around, but that's far from being published.
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 using symfony 1.4.8 with sfDoctrineGuardPlugin for my backend.
My question is how can i customise sfDoctrineGuardPlugin's default content? For example, how can i do something on the page between filter and table (on the left hand site)? Or, how can i customize table (http://goo.gl/ZmRey)?
I cannot find any solution for using partials on backend. Is there any way to use partials/components/slots on backend?
I hope you understand my question and tell me a way.
Thanks for your answer(s),
Erman
Partials, components and slots are no different on the back-end to the front-end - your "backend" is just another Symfony application. From the screenshot you gave, it looks like you're looking to customise the admin generator theme.
The quickest way to get started with this is to look in your cache/appname/ folder and see the automatically-generated modules here, with all the template files, partial files and so on. You can then create an empty module in your application, and override select parts of the theme with whatever you want to change. See this part of the Symfony docs for a full list of partials etc, and how to go about overriding them in more detail.
In the specific case of sfDoctrineGuardPlugin-module pages, these can be overrided in the same way as normal modules - simply create eg an sfGuardAuth module and override the selected parts of the module you want to.
If you want to go further and create your own admin generator theme, this is a bit more advanced. Here I will shamelessly promote a blog post I wrote last year ;-) John Cleveley's presentation also provides some great tips.
I have a Drupal website and I want to add a page in the admin menu with a form that will generate reports, based on the users that answer some enigma, and allow data extraction.
How should I proceed to create the form and make the requests? Should I install a module like CCK to create the form and then use another module for the data extraction (in an excel file)?
Thanks for your help.
Frank
CCK and views can make this easy for you, but doing this, will create answers as content on the site. I'm not sure if this is desired, if it is, you can go ahead. You would be able to create the solution purely be setting up the modules.
If you don't want users answers to be content of the site, but only accessible by admings, you should consider the webform modules, which will allow you to easily create custom forms that users can submit and save the data. I don't think that webform has built in support for views, or data extraction, but this could be accomplished in a custom module.
I have tried to expose tables to views in order to use it to do just this and have created CSV files myself in custom modules. It requires some special knowledge to do this, but once you get that, you can do it pretty quickly. If you have troubles with Drupal and PHP development, this will be a hard task though.
The Views module will allow for creating of reports. It has several plug ins which allow for the data to be downloaded as csv, xls and so on.
I'm trying to create a directory in Joomla, which means, the user will have a form to add an entry (with custom fields) and the entry will show up in a page listing all added entries.
For now, I'm going with SOBI which is a Joomla component handling all this.
Question:
I was wondering if there are any good alternatives, what I'm looking for is :
Multi categories
Custom fields
Easily stylable forms and listings
Well you should try some of the CCK solutions out there. They have all you asked for.
Some of them are:
ZOO
Flexicontent
K2
ZOO is IMHO the best, but has no frontend submission feature. Flexicontent and K2 do have it.
I like Mosets Tree. I've used it on several sites.