I've build a simple component, and have some parameters set on the component view. I am trying to load the menu item holding the component with AJAX. I startet out with code from Chris Duells Ajax in Joomla with jQuery, which says "you can call absolutely any component you like, as long as you know the non SEF link to the page you are after". If anyone could explain to me why I can't use SEF urls that'd be great.
To go around the SEF problem, I modified the mod_module helper to supply a data-link attribute with the corresponding internal url, which I then pick up with jQuery and feed to my ajax function.
function loadContent( url ){
console.log( 'url is: ' + url );
$( "#load" ).load( url + "&tmpl=barebone");
}
An example URL would be index.php?option=com_mycomp&view=feat&Itemid=117.
If I go straight to my component through the SEF url, the parameters are displayed, even if I use the internal url, but if I try loading it with the function above, parameters are ignored. It does load parameters if I start out by loading that particular component, but that is not a solution. In other words, it seems like Joomla! is supplying me only with view.php and none of the internals behind it.
How can I make this work?
Please let me know if I neglected to mention important information or if I need to make myself more clear.