I'm trying to reload a views block that needs an argument. I'm able to load blocks using
$.get(base_url + '?q=component/block/' + module_name + '/' + block_id, null, function(newHtml)
but it will only returns blocks that don't require an argument (nid). So I'm trying to use component/view instead thinking maybe this is the better way to reload a view.
Unfortunately, I get the error
warning: Missing argument 2 for component_get_view() in /sites/all/modules/component/component.module on line 81.
when trying to use component/view as the url. How are other people able to do this? Also, I don't see how to pass in the view name and display name to components. How are we supposed to do this?
Comments
Comment #1
cerup commentedOk, it looks like maybe I wasn't providing the full URL. I've changed it to...
If I manually put in a 'nid', then it returns the right view. Is there a way to pass the nid or another argument to component dynamically? How does one refresh a view that requires an argument to load? Shouldn't the views_embed_view be able to get the arguments automatically when it's called?
Comment #2
rlnorthcutt