About the author

Related Articles

One Comment

  1. 1

    Amit Ray

    you can use this component http://extensions.joomla.org/extension/components-anywhere
    Install the plugin and enable it.
    Then you can call the component this way {component url/of/the/component}

    {component index.php?component=com_example&form=1}

    Try to use non-sef urls in the url but sef url will still work.

    There is another way to achieve this by calling the model into your controller file this way

    JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_example/models', 'ExampleModel');

    What this does is it searches the model class starting with ExampleModel in the folder specified. here you can eneter just a path string or array of the directories as the first parameter. Next you have to call the method inside the views file this way

    $exmodel = JModelLegacy::getInstance('Something', 'ExampleModel', array('ignore_request' => true));

    So here you create an instance of the class object which can be used to get the items from the model this way

    $items = $exmodel->getitem();
    $this->assignRef('items', $items);

    next you can copy the default.php file in the tmpl folder of that component and place it anywhere you like inside your layout file. Basically instead of copying the entire component you are calling the model and getting the data which you can use in your layouts.


Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © 2017 SolutionMmyself.com