Display joomla component within another component -


i have 2 components trying integrate.

i created new view in component #1,

i iframe or load content component #2.

the iframe works once have added 'tmpl=component', click link in iframe. joomla includes joomla footer , header.

is there efficient way load content component #2 component #1?

i not have access joomla template. have access component #1 , #2.

thanx.

using iframe not best option, better off invoking model of other component main component's controller , handle views main component. double component exist in backend logic, , views handled main component alone.

this work if secondary component's developer refrained using jpath_component or other constants point wrong component.

to make example, in controller or main component's model:

$com_path = jpath_site.'/components/com_secondary_component/models'; jmodellegacy::addincludepath($com_path , 'seccompprefixmodel'); $secondarymodel = jmodellegacy::getinstance( 'modelname', 'seccompprefixmodel' ,array('ignore_request' => true)); 

... can use $secondarymodel->getitems() or like, secondary component's items available in main component.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -