I have a few pages for my site that I'd like to keep outside of the CMS Made Simple 'system' but I'd like them to use the same template system, styles, and navigation as all the pages in CMS Made Simple.
I can use a PHP include, but since things like the navigation aren't static files, I'm not sure how to call them. If I can.
Can I include global content blocks from CMSMS into pages not made by CMSMS?
-
- Forum Members
- Posts: 36
- Joined: Tue Jun 19, 2007 10:20 pm
Re: Can I include global content blocks from CMSMS into pages not made by CMSMS?
You could add them to your CMSMS system but not show them on your menus? This way you can still get to them if you know the url - of course a lot easier with friendly urls. You could then just book mark them in your browser. If you don't want them to be searched then add the 'no search' thing in the html. You will need to check if they appear in sitemap though - i can't remember if they do but it would be easy to fix.
Hope this helps,
Russ
Hope this helps,
Russ
-
- Forum Members
- Posts: 36
- Joined: Tue Jun 19, 2007 10:20 pm
Re: Can I include global content blocks from CMSMS into pages not made by CMSMS?
I know how to add pages that don't show in the menu, but that's not what I'm asking. I want to know is an easy way to 'include' (using PHP) some elements created stored within CMSMS (such as a page template and CSS) in some PHP pages I built outside the system. I'll play around with some MySQL queries and see if I can do it. I thought maybe some one had done so before and could feed me the code. I can copy the template and CSS code, that's no problem, but I'd rather it be stored in one place, with just one copy.
Re: Can I include global content blocks from CMSMS into pages not made by CMSMS?
You mean something like?
require_once("/pathto/cmsms/include.php");
global $gCms;
Russ
require_once("/pathto/cmsms/include.php");
global $gCms;
Russ
-
- Forum Members
- Posts: 36
- Joined: Tue Jun 19, 2007 10:20 pm
Re: Can I include global content blocks from CMSMS into pages not made by CMSMS?
Thanks, yes, something like that. Wondering what it would be to include a template? If it were a file named "template-default.php" or "header.php" I would know how to do it. But I'm not sure how to handle a template inside CMSMS.
Re: Can I include global content blocks from CMSMS into pages not made by CMSMS?
I'm not sure, never having done it but a good place too look would be
http://wiki.cmsmadesimple.org/index.php/User_Handbook/Developers_Guide
Especially the api which of course has specific classes for Templates and TemplateOperations
Russ
http://wiki.cmsmadesimple.org/index.php/User_Handbook/Developers_Guide
Especially the api which of course has specific classes for Templates and TemplateOperations

Russ