The CMSMS AJAX Challenge Topic is solved

General project discussion. NOT for help questions.
User avatar
blast2007
Power Poster
Power Poster
Posts: 508
Joined: Wed Aug 01, 2007 5:36 pm

Re: The CMSMS AJAX Challenge

Post 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
NaN

Re: The CMSMS AJAX Challenge

Post 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...
User avatar
blast2007
Power Poster
Power Poster
Posts: 508
Joined: Wed Aug 01, 2007 5:36 pm

Re: The CMSMS AJAX Challenge

Post 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
Last edited by blast2007 on Fri Jul 31, 2009 5:15 pm, edited 1 time in total.
SimonSchaufi

Re: The CMSMS AJAX Challenge

Post 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?
Last edited by SimonSchaufi on Mon Aug 03, 2009 10:48 am, edited 1 time in total.
NaN

Re: The CMSMS AJAX Challenge

Post 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 ...
SimonSchaufi

Re: The CMSMS AJAX Challenge

Post 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=,,,
Last edited by SimonSchaufi on Mon Aug 03, 2009 11:55 am, edited 1 time in total.
SimonSchaufi

Re: The CMSMS AJAX Challenge

Post by SimonSchaufi »

is something similar also possible for global content blocks or only possible with the solution mentioned in Reply #10?
Last edited by SimonSchaufi on Mon Aug 03, 2009 12:11 pm, edited 1 time in total.
Post Reply

Return to “General Discussion”