New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add elgg.view(name, options) shorthand to js (Trac #3228) #3228
Comments
cash wrote on 41371686-09-11 +1 1.8.x or 1.9? |
ewinslow wrote on 41374863-04-08 We could commission Ravindra to implement it as part of the ajaxify project, which I assume would mean 1.8.x. |
Milestone changed to |
trac user vazco wrote on 41390504-10-07 It would be great if view could take additional parameters if they are defined as supported by ajax, example of code: <?php
$vars = array(
'ajax' => true,
'ajax_parameters' => array('param1', 'param2'),
);
echo elgg_view('view_name', $vars);
?>
<script type="javascript/text">
//invoke view with some_parameter equal
elgg_refresh_view('view_name',{param1:paramvalue, param2:paramvalue});
</script> It could be usefull as well if original parameters with which view was invoked in PHP would be passed to it's ajax invocation. This way, we could eg. refresh view which displays entity by it's GUID without having to pass GUID as ajax parameter. This would be more secure as well since such parameter would be fixed to value set in PHP. |
cash wrote on 41398139-10-27 vazco - the options parameter in the ticket title is for passing variables to the view. On the PHP side, we already support passing parameters and passing GUID so that an entity is passed to the view. See elgg_ajax_page_handler() in elgglib.php library. |
Milestone changed to |
Currently getting a view is a simple as |
Original ticket http://trac.elgg.org/ticket/3228 on 41226110-07-02 by ewinslow, assigned to trac user blacktooth.
Elgg version: 1.7
Been thinking about how to do something like this for a while, and now with Cash's idea for /ajax/view/... it's totally possible.
The text was updated successfully, but these errors were encountered: