-
Notifications
You must be signed in to change notification settings - Fork 424
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
How render one section only #330
Comments
Pass false for the rest of the sections? |
you have to sort each section in the page to disable it which may take long time , is there any easy way ! |
I'm not entirely sure what you're asking, and how you would like to do it instead. Can you give me an example? |
Some time a part of the page has ajax call an i want to call same page but with GET parm referring to the section i want to render. Well i came up with a solution , the Render now is a function like this : in HTML i name the section like
now in the php page i manage some logic . if
|
Variables are false by default. Did you try just passing in the section you wanted to render as true? |
well the problem is :
|
Hey, this is probably some gravedigging and you probably don't have this problem anymore, but I just solved it (in a bad way I guess) and this could help people in the future that stumble upon this thread like me. I also wanted to only update a part of my mustache-tempalte and not the whole thing (because this would fu** up my javascript and I had to rerun it, resulting in an endless loop...). My solution incorporates the usage of jquery on the resulting html string and then only replacing said data-region: templates.render('tool_supporter/course_table', data).done(function(html, js) {
// Get the data-region of the rendered html
var anchor = $('[data-region="course_filtering"]', $(html));
// Only render the filtering dropdown of the tables.
$('[data-region="course_filtering"]').replaceWith(anchor[0].outerHTML);
}).fail(notification.exception); |
Dear all
Let say i have this html:
how can i chose to render only
section_2
The text was updated successfully, but these errors were encountered: