Is there a way that I can export the menu from CMS to another application? The desired effect is that when the admin updates the menu it will update the same menu on the forum page.
I tried to build a page in CMSMS and strip everything but the menu and then include that into a php file. No luck. I think this is due to the fact that it's not an actual page but rather content generated from the db.
Would be an awesome feature should someone figure this out. Thanks.
Export Menu
Re: Export Menu
you could create a template (which is not used anywhere else) and then link to it by iframe or write small php script to get the content from cmsms and then echo it out.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Export Menu
You would have to use curl, or file_open or something on a CMS url that just extracted the menu. there's a moduleinterface call that you may be able to do...
or:
Create a stripped down template with only {menu} and {content} in it (maybe {stylesheet}) too.
Create a page (not shown in menu) that uses that template
in your external php script issue a curl request to get the specific page into a variable, and then echo it.
or:
in your new php script, use smarty, create a smarty instance, and do a fetch on either of the above url's.
or:
Create a stripped down template with only {menu} and {content} in it (maybe {stylesheet}) too.
Create a page (not shown in menu) that uses that template
in your external php script issue a curl request to get the specific page into a variable, and then echo it.
or:
in your new php script, use smarty, create a smarty instance, and do a fetch on either of the above url's.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Export Menu
I tried it as an iframe and include, neither would work. Has anyone tried this and I got to work??
I will take a shot at it with cURL later, I need to read up on it since I've never used it.
I will take a shot at it with cURL later, I need to read up on it since I've never used it.
Re: Export Menu
Although I'm no uber-expert on cURL either, I've found it's use rather simple. It basically imports the output of any page anywhere using a multitude of protocols. Cool huh? And the kicker is that it then can use that content as native unlike an iframe which is unfriendly so SE's curl puts the 'borrowed' content right there in the page.
from the php manual (not mine)
miramardesign
http://miramardesign.com
I code therefore I am.
from the php manual (not mine)
miramardesign
http://miramardesign.com
I code therefore I am.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Export Menu
using a url like found in this thread:
http://forum.cmsmadesimple.org/index.php/topic,12634.0.html
You can do it with an xmlhttp request.
http://forum.cmsmadesimple.org/index.php/topic,12634.0.html
You can do it with an xmlhttp request.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.