How to show the backend list in joomla frontend - joomla

i have made a custom form in my joomla admin panel and now i wanted to know how to call that admin form in the frontend. Other than using:-
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
Please tell me the solution for it....

You absolutely need to build the frontend of the component, then in the component's controller you can instantiate the backend models if you need it, so there won't be too much code duplication.
JModel::addIncludePath(JPATH_ADMINISTRATOR.'/components/com_yourcomp/tables');
$model = JModel::getInstance('somemodel');

Related

Handling multiple views controllers in CodeIgniter 4

I am new to CodeIgniter 4.
I have one controller named Pages and helps to display website pages normally. Then I have another controller named Admin which is suppose to load the admin view with its own header and footer files.
While Pages controller works fine, the Admin controller keeps saying 404-file not found admin.
I think I have a problem with my current Route settings below. Please help.
$routes->setDefaultController('Pages');
$routes->setDefaultMethod('default');
// Route Definitions
$routes->get('/', 'Pages::index');
$routes->get('(:any)', 'Pages::default/$1');
try ajusting your code like this.
$routes->setDefaultController('Pages');
$routes->setDefaultMethod('default');
// Route Definitions
$routes->resource('pages');
$routes->get('/', 'Pages::index');
$routes->get('(:any)', 'Pages::default/$1');

Integrating Laravel app into Joomla CMS

I would like to build a custom application in Laravel framework and include it in Joomla.
What I would like to do is to replace central content of Joomla with application served from content.
Joomla url: http://www.joomlasite.com/campaign-directory -> should show content from laravel url: http://www.joomlasite.com/laravel/directory/showall
I noticed component Joomi for Joomla, but Iam not sure if this component will be able to do that.
Please advice.
Thanks!
I think you mean Jumi, and yes, I think that Jumi can do what you want, but I believe there are other easier ways to achieve what you need to do. What you can do is use the iFrame Wrapper component in Joomla to "wrap" your lavarel application and display it in Joomla. Try that before using a Jumi if possible.

Prestashop module admin panel with custom view

I need to know how to create a module on Prestashop with a custom view on admin. The documentation is very poor and I don't understand how to call a view with parameters passed by the controller. I'm using Prestashop version 1.6.
I already did these steps:
Created XML.
Created controller with constructor and install/uninstall.
Created table on DB and class.
Linked on admin menu my module.
When I go to my tab on admin panel I see a table with my db data. I need to load a custom tpl file where I can customize completely my page.
I have read so many guides and documentation (ufficial or not) but nothing clear.
Just follow the HTML and CSS in getCOntent() function in your main php file.
Whatever HTML and CSS return getContent() function will be view of your module in admin panel.
Just concentrate in getContent function of other existing module and you will get what you want.
I f you want to load a separate view than create it separate and load it in getContent() function.

frindly routing in joomla

I am doing a website in joomla 3.0, I have select a friendly URi in the backend.
I create several componente for the website too, and my route to access to this component is like this.
<?php $link =JRoute::_('index.php?option=com_projects&view=proyectos&format=raw&task=proyecto&id='. $item->id);?>
But when the browser show this router it isnĀ“t friendly router.
Any idea?
You need to create a router.php file for your component to tell joomla how to build the sef url and then parse it when the sef url is requested.
Check out the components/weblinks/router.php file for an example.
Alternatively, if you are using a sef component like joomsef or sh404sef, you will need to create a plugin for your component. You can find documentation on how to do this on the component makers websites.

How does joomla breadcrumbs work internally?

I've already gone thru: http://docs.joomla.org/How_to_add_breadcrumbs
and http://api.joomla.org/Joomla-Framework/Application/JPathway.html
but they don't help.
I have not found any more info in any books or internet.
My website has 1000's of pages generated thru script.
I want to generate breadcrumb navigation for the pages.
Google has refused me Adsense account due to this lack of navigation.
I'm not sure what else there is to explain. Joomla stores breadcrumbs in the $pathway object. A components adds items to that object using 2 parameters, name and link.
You call the object with:
$pathway =& $mainframe->getPathway();
Then you add to it with:
$pathway->addItem('name of item', 'link to item');
Then you add the breadcrumb module in the module manager. There is no more too it, what else would you need?
The breadcrumb is generally updated by the component that is being called.
$pathway =& $mainframe->getPathway();
And then
$pathway->addItem($membership->name, JRoute::_('index.php?option=com_rsmembership&view=membership&cid='.$membership->id.':'.JFilterOutput::stringURLSafe($membership->name) . "&Itemid=" . $itemid));
The above is an example from rsmembership
Essentially the breadcrumb is maintained (or stored) by Joomla, and added to by the components.

Resources