4

I have custom component and plugins and listing some details in table after click on the table i'll go to details page. i want show the one of details in article, so i created a custom plugins and got the id of the details, but i dont know how to call the details view in plugins.

6

From joomla 3.0 onwards a layout sharing feature is introduced, using it you can call a layout across views or extensions. It requires creating a layout object and then render the view using that object as:

$layout = new JLayoutFile('my_layout', $basePath = JPATH_ROOT .'/components/com_something/layouts');
$html = $layout->render();

this will render the 'my_layout.php' layout file found in JPATH_ROOT .'/components/com_something/layouts' directory. So you can try the above code in your plugin to call your component view if you are using joomla 3.0+

For more details check this page :- https://docs.joomla.org/Sharing_layouts_across_views_or_extensions_with_JLayout

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.