Hi all,

I am sorry for cross posting but as that one has gone unnoticed I wanted to exhaust my chances...

I have been looking at joomla.application.component.helper::renderComponent and its obvious that - at least due to the various JPATH_COMPONENT* constants - its not possible to render a component within a component
 
Is there any way anyone can advise me to do this?

Maybe some custom renderComponent someone have already in place and wouldn't mind to share?
 
I do realize that I could make http request with tmpl=component and collect the rendered results but that's really not what I would like to do for the following reasons:
1. feels conceptually so wrong to hit the server again while I am right in the server executing
2. I would like to merge the rendering parameter with one that is dynamically built
 
I have been searching in all Jooma! related groups and I just haven't found any related discussions which makes me wonder if this need is really that unique or maybe too off...
 
Thanks

Views: 150

Replies to This Discussion

Hi Gobezu,

I just intended to answer you on the dev-general-mailinglist when I saw your posting here.

The way to do what you want in Joomla! is not using renderComponent, but calling parts of another component directly. See for instance here: http://www.corephp.com/blog/joomla-mvc-load-a-model-from-anywhere/#...

Best would be to call the controller of another MVC-triad from the controller of your "parent"-component. In that way you'll get a hierarchic "tree" of MVC-triads. That is called HMVC. In Joomla! there are no native provisions to use that, but you can always program it yourself; just beware that you don't redirect from your sub-controller. In Nooku-Framework, which you can easily use within Joomla!, there are native provisions. See: http://www.torkiljohnsen.com/2010/09/14/advancing-from-joomla-mvc-t...

Another nice explanation of HMVC (using the Kohana Framework) is on http://techportal.ibuildings.com/2010/02/22/scaling-web-application...

Drupal uses this HMVC-principle too; there it is called PAC; see http://en.wikipedia.org/wiki/Presentation-abstraction-control
Hi Herman,
Thanks a lot for your helpful answers and I will take sometime to digest and work through it.
I am sure I will have some follow up questions...
I had began wondering if my question was so outlandish that people were just browsing away from it :)
These days many Joomla! ways lead inevitably to Nooku so it looks definitely like the sooner I tackle that one the better I might be.


Gobezu Sewu said:
These days many Joomla! ways lead inevitably to Nooku so it looks definitely like the sooner I tackle that one the better I might be.

+1

RSS

Badge

Loading…

© 2012   Created by Amy Stephen.

Badges  |  Report an Issue  |  Terms of Service