Does anyone know how I can incorporate HV Menu by Ger Versluis (available at http://www.dynamicdrive.com) into a template?
Code:
//HV Menu- by Ger Versluis (http://www.burmees.nl/)
//Submitted to Dynamic Drive (http://www.dynamicdrive.com)
//Visit http://www.dynamicdrive.com for this script and more
function Go(){return}
Your browser does not support script
How about getting an external text file to show up as an include in a template?
How about using a page created in CMSMS as an include file in a PHP page that was not created in CMSMS? Using the "editcontent.php?content_id=6" type of file name that appears in the url bar when the CMSMS page is clicked does not work.
Thanks in advance for any help!
Using With HV Menu / Includes
Re: Using With HV Menu / Includes
If You want display links to CMSMS content pages by any DHTML menu with own config file, it is not so easy - in case You want to resolve list of pages hierarchy DYNAMICALLY. It is definitely task for PHP programmer.nerdgirls wrote: Does anyone know how I can incorporate HV Menu by Ger Versluis (available at http://www.dynamicdrive.com) into a template?
BUT: if You have a website without needs add/delete pages or edit page menutext and alias, complete integrating of any DHTML menu with external configuration file is quite easy.
I will try describe here some best simple howto - 'best clean' way is handle this by cmsms plugin/module, so You don't have to care about new/edited/deleted pages - but something tells me You are not programmer or You are not familiar with CMSMS and Smarty template engine yet
1. download last version of DHTML menu HV menu - http://www.dynamicdrive.com/dynamicinde ... hvmenu.zip
2. write code
Code: Select all
{literal}
<__script__ type='text/javascript'>
//HV Menu v5.411- by Ger Versluis (http://www.burmees.nl/)
//Submitted to Dynamic Drive (http://www.dynamicdrive.com)
//Visit http://www.dynamicdrive.com for this script and more
function Go(){return}
</__script>
<__script__ type='text/javascript' src='exmplmenu_var.js'></__script>
<__script__ type='text/javascript' src='menu_com.js'></__script>
<noscript>Your browser does not support script</noscript>
{/literal}
3. start playing with end of file 'exmplmenu_var.js' - where is configuration of dhtml menu - link to Your CMSMS default page is 'index.php', link to page with alias 'about_us' is 'index.php?page=about_us' etc.
Writenerdgirls wrote: How about getting an external text file to show up as an include in a template?
Code: Select all
{include file="extfile.txt"}
I am not sure I completely understand Your needs - correct link to CMSMS content page is 'index.php?page=ALIAS_OF_YOUR_PAGE' - trying include links to admin pages will not work (as all of CMSMS users expects - file 'editcontent.php' is designed to be use by admin webinterface after user is logged with username and password).nerdgirls wrote: How about using a page created in CMSMS as an include file in a PHP page that was not created in CMSMS? Using the "editcontent.php?content_id=6" type of file name that appears in the url bar when the CMSMS page is clicked does not work.
Try describe Your needs about 'using a page created in CMSMS as an include file in a PHP page that was not created in CMSMS' in detail, please - or reason why You don't want to use tag
Last edited by 100rk on Sun Apr 17, 2005 3:39 am, edited 1 time in total.
Re: Using With HV Menu / Includes
Got it! Thanks.
Here's my situation: I have an existing site that I now need to allow users to have access to edit multiple pages. So, I could either build a template in CMSMS and allow them to edit the text on pages with that template assigned to them, or I could simply create the CMSMS pages as text-only and place an include file pointing to it on my existing page. Preference was the latter, but I actually implemented the former. Example: I already had a listing.php page and it would have been nice to place an include on it pointing to the corresponding text-only listing page in CMSMS. The standard php include code would not work with index.php?page=listings code. I would still like to know if that is possible and what the code would be to do that. But for now, I'm going with the template I built.
Thanks again!
Here's my situation: I have an existing site that I now need to allow users to have access to edit multiple pages. So, I could either build a template in CMSMS and allow them to edit the text on pages with that template assigned to them, or I could simply create the CMSMS pages as text-only and place an include file pointing to it on my existing page. Preference was the latter, but I actually implemented the former. Example: I already had a listing.php page and it would have been nice to place an include on it pointing to the corresponding text-only listing page in CMSMS. The standard php include code would not work with index.php?page=listings code. I would still like to know if that is possible and what the code would be to do that. But for now, I'm going with the template I built.
Thanks again!
Re: Using With HV Menu / Includes
Hmm... One question: do You want to use any modules, plugins, HTML blobs or smarty tags inside of those 'text-only' CMSMS pages?nerdgirls wrote: I have an existing site that I now need to allow users to have access to edit multiple pages. So, I could either build a template in CMSMS and allow them to edit the text on pages with that template assigned to them, or I could simply create the CMSMS pages as text-only and place an include file pointing to it on my existing page.
If not, just create file named 'pagecontent.php' in Your webroot directory, paste into it code
Code: Select all
<?php
require_once dirname(__FILE__).'/include.php';
function getCmsPageContent($pagealias) {
$page = ContentManager::LoadContentFromAlias($pagealias);
if (is_object($page))
return $page->Show();
else
return '';
}
?>
Code: Select all
<?php
...
require_once dirname(__FILE__).'/pagecontent.php';
$pagecontent = getCmsPageContent('test');
echo $pagecontent;
....
?>
Code: Select all
require_once dirname(__FILE__).'/pagecontent.php';
Important: read content of file include.php - You will include foreign code, so You have to care about variable names (possibility of conflicts with variable names of Your non-CMSMS scripts).
Anyway, this is temporary solution only, because it open it's own db connection etc. But it is good start point for study CMSMS, because 'MADE SIMPLE' is it's motto and as You can see, You don't have to write a lot of lines of PHP code
Last edited by 100rk on Tue Apr 19, 2005 1:13 pm, edited 1 time in total.