How to display content at component position in joomla? - php

I have developed one search module which searches users in joomla. My problem is it displays content in same module, rather I want it to display at component position. I am not using any other component in that page. My Joomla version is 2.5
Any suggestions???

Under Joomla!'s MVC a module's output is rendered only into the module position, to have content rendered in the main component position you will have to create a matching component that responds to the modules search request.

Sounds like you need to develop it as a component instead of a module. It could probably easily be acheived using the Joomla Component Creator

Related

how to change content of template postion by a component in joomla

what i need is, when component run,component change content of position.
for example when url is: index.php?option=com_test , content of position 'left' = test and when url is: index.php?option=com_users, position show default data by modules.
i want tp change content of modules in this position too.
i have viewed https://joomla.stackexchange.com/questions/1054/displaying-a-joomla-module-using-php but this is for view module in component.
One way to achieve this is to install the free or paid version of Advanced Module Manager.
You can publish multiple versions of your modules in the required module positions and control when each one is displayed via the component.

Creating custom joomla pages

I am building in Joomla! version 3.3.6 for my first time. I have built a ton of custom Wordpress in the past. The first challenge I have encoutnered, is the requirement of building a page which does not look anything like the template pages. The client desires a landing splash page, with large images and a gradient background. However, they are using a template already. Now, I know that I shouldn't start my research on Stack Overflow, so I've watched hours of tutorials for beginners on Lynda.com. No one seems to be covering this topic. Any help would be really appreciated.
To explain this idea, I will compare to what I would do in Wordpress. I would create a file named "page-splash.php" and give it a template name: Splash. Then I would fill this page with my choice code. Finally I would create a "Page" object in wp backend and give it the "template" of "splash".
This is very possible and often accomplished in Joomla.
You would simply need a second template installed and assigned to the page. In Joomla, you could technically have a different template installed for every single page if you wanted to. But in this case, you just need a 2nd template.
Start by building a bare bones template, as found here: https://docs.joomla.org/Creating_a_basic_Joomla!_template (or copy the current template from /templates/ directory and update the templateDetails.xml file so it will install as a second template)
Install 2nd template via Extension Manager
Next, make sure your new page is linked within the Menu Manager (as you will need a menu assignment to call the new template in next step)
Go to Template Manager and you can assign your new template to the menu item defined in the previous step.
You now have 2 independent templates running on the same installation and they can be styled and configured independent of one another.
Assigning more than one template is such a common task in Joomla that you can find more details about this in the official documentation: https://docs.joomla.org/J3.x:Switching_templates
Joomla is by Default not a Blog/Template layout cms, but rather a web application builder.
You can get extensions to create custom templates that make Joomla function like a blog application such as ZOO or K2. I would not go the route of creating individual templates for each page as it would be similar to installing a different theme for each page on a WordPress site.

Pagination in front end Module Joomla

I've searching trough google for a way of adding pagination into a module, but i could only find information about adding it into components like here:
How to add pagination for component front end (Joomla 2.5)
Is it posible to implement this same principles to make a pagination for a module?, or a different approach is needed?
I think this is not the correct way of doing to try to implement pagination in a joomla module. Normally, only component are made to be able to use standard Joomla pagination, because it uses itself models and view controller...
The example we see on the link you propose is using pagination from the view controller (view.html.php), witch extend JViewLegacy (witch is an alias for JView). Pagination is natively supported by it.
I imagine you need to show many items pages on a module, but maybe reload the page for it is not the best option. You can perhaps try to load more items, and to use a JS script to do pagination (even a slider can do it nicely), or simply to add a link to the whole section of the associated component.

basic joomla extension development confusion

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/

how to display a component at a specific position in joomla template?

I have developed few custom components for joomla. Whenever I execute these components they appear at a specific position in template say the position name be 'showcase' what I wanna do now is
how to display the component at some other arbitrary position say 'showcase2'.
Help me out my project is stuck due to this???
Thanks in advance.
Create the code you want to display as a module rather than a component. Components are designed to appear in the "main" portion of your page. If you need to, you can reference some of your component code from the module. I wouldn't recommend running the component in a wrapper in the module.
Note that exactly one component is run in each request to Joomla.
To do this most people provide a companion module that can render the component in a module position. Essentially this could just be a wrapper around the component with some simple parameters that have some fine tune control over the layout (e.g. max width, alternate style)

Categories