Page 2 of 2
Re: The CMSMS AJAX Challenge
Posted: Fri Jul 31, 2009 11:44 am
by blast2007
calguy1000 wrote:
you don't need special templates for this...
all you need to do is add showtemplate=false to the url. for the ajax request.
WOW that will speed up every page loading!!! Very cool trick to be added to the wiki !!!
Could this be (use of ajax to load content of page) a FR for default core installation?
regards
blast
Re: The CMSMS AJAX Challenge
Posted: Fri Jul 31, 2009 3:56 pm
by NaN
blast2007 wrote:
Could this be (use of ajax to load content of page) a FR for default core installation?
Not sure if this is a good idea since you'll always need the script to be included in the template.
And imagine all the "bugreports" if someone checks this option and forget to include the script.
(Just remember all the questions about the the js to make the CSS Dropdown menu working in IE6...

)
But if the JS is included automatically to a template if this option is checked it would be a great idea.
@kendo451:
Btw Thanks for that topic.
Very interesting since i'm working on a site where i need to load several content blocks.
But as calguy said, i will get trouble with it.
Haven't found a solution yet.
I wonder if it would go if i create a UDT that is subscribed to the ContentPreCompile event...
Re: The CMSMS AJAX Challenge
Posted: Fri Jul 31, 2009 5:13 pm
by blast2007
NaN wrote:
Not sure if this is a good idea since you'll always need the script to be included in the template.
Yes, NaN
I mean a sort of automation for this task like a dedicated template with a name like "Ajax CSSMenu top + 2 columns"
I found that it's possibile to leave untouched the menu and make all the system working very well with
Code: Select all
$('#primary-nav li a').click(function(){
Now I'm making some tests with fadeout -> fadein effects and contents load via ajax works like a charm.
This was really a nice post. As I've already told, this forum is mine of gold.
Thanks all contributors.
regards
blast
Re: The CMSMS AJAX Challenge
Posted: Mon Aug 03, 2009 10:46 am
by SimonSchaufi
hi!
I have another challenge now. I would like to reload the menu via AJAX as well and i know only this call so far:
Code: Select all
index.php?mact=MenuManager,cntnt01,default,0&cntnt01showtemplate=false
now i dont understand the parameters and the modification.
here are some questions i have:
- how can i load the menu with a menu template (since it loads the full menu)?
- i have 2 menus on my page. how do i load them separately? one template will start with level 1, the other with level 2. how is that possible to load them?
Re: The CMSMS AJAX Challenge
Posted: Mon Aug 03, 2009 11:25 am
by NaN
You can add the same params you used in the template with smarty.
All you need to do is to add the module id before the param name.
The module id in this case is cntnt01.
E.g:
index.php?mact=MenuManager,cntnt01,default,0&cntnt01showtemplate=false&cntnt01number_of_levels=1&cntnt01start_level=2&cntnt01template=simple_navigation.tpl ...
Re: The CMSMS AJAX Challenge
Posted: Mon Aug 03, 2009 11:31 am
by SimonSchaufi
NaN wrote:
You can add the same params you used in the template with smarty.
All you need to do is to add the module id before the param name.
The module id in this case is cntnt01.
E.g:
index.php?mact=MenuManager,cntnt01,default,0&cntnt01showtemplate=false&cntnt01number_of_levels=1&cntnt01start_level=2&cntnt01template=simple_navigation.tpl ...
thank you thank you thank you!!!
just found out that you can use any string for your module id.
so the parameters are:
?mact=,,,
Re: The CMSMS AJAX Challenge
Posted: Mon Aug 03, 2009 12:03 pm
by SimonSchaufi
is something similar also possible for global content blocks or only possible with the solution mentioned in Reply #10?