How to let customers add new pages with menu?

10 posts by 3 authors in: Forums > CMS Builder
Last Post: January 12, 2009   (RSS)

Re: [QuietCalm] How to let customers add new pages with menu?

By Dave - January 7, 2009

Hi QuietCalm, welcome to the CMS Builder forum! :)

I'd need some more information about the "Model Page After" feature you requested to know if there's a way to do that currently or what would be involved, but let's start with the simple "How to add new pages" question.

Typically you'd just create an account for the client and they would login to the cms, click on the category section and be able to click on a page from the list or click "Add" to add a new one.

If you're using the category menu and followed the forum thread about it this will automatically add a new item to the menu that will display the page when clicked.

Let me know if that's working or how far along you are and we'll do our best to help!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] How to let customers add new pages with menu?

OK.. I got the menu to show up on the page but when i click a menu link i get an error...

Warning: require_once(C:/wamp/www/sb/core2/admin/lib/viewer_functions.php) [[url "http://72.35.27.78/function.require-once"]function.require-once[/#0066cc][/url]]: failed to open stream: No such file or directory in /var/www/vhosts/lambtonmall.com/categoryList.php on line 3

Fatal error: require_once() [
[url "http://72.35.27.78/function.require"]function.require[/#0066cc][/url]]: Failed opening required 'C:/wamp/www/sb/core2/admin/lib/viewer_functions.php' (include_path='.:/usr/local/lib/php') in /var/www/vhosts/lambtonmall.com/categoryList.php on line 3

Now.. i looked in Categorylist.php and i cannot find anywhere where it states C:/wamp/www/sb/core2/admin/lib/viewer_functions.php

I also did a search on all files and this does not show in any page of cms.

I have attached some files.

Any idea why i get this error? I am not a php kind of guy.

QuietCalm


Re: [QuietCalm] How to let customers add new pages with menu?

By Dave - January 8, 2009

Hi QuietCalm,

The require_once line needs to be updated the have the same path as your server. Just click on Admin > Code Generator, and create any kind of viewer, then copy the require_once() line.

It will probably look something like this:
require_once("/var/www/vhosts/lambtonmall.com/cmsAdmin/lib/viewer_functions.php");

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] How to let customers add new pages with menu?

THat is what it has from what io can see.

What file needs to be looked at?

Did you see the attached files in previous post.. it looks right.

I searched all my files, and the line to replace is already replaced.

Can you tell me where to look and I can send the file as attachment for you to double check..



DOn

Re: [QuietCalm] How to let customers add new pages with menu?

By Dave - January 8, 2009

Hi Don,

Yea, it looks right. I'm not sure where it's getting the "C:/wamp/www/sb/core2/admin/..." from. That is the path from my dev computer. It would have been in the default categoryList.php you downloaded but it has been changed already in the version you attached. You've updated the /categoryList.php function in your website root right?

If you like you can send me CMS and FTP login details to dave@interactivetools.com and I can take a look for you. (Email, don't post login details to the forum).

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] How to let customers add new pages with menu?

ok it was loading the wrong categorylist file.. i fixed it but now i get this:

http://72.35.27.78/categoryList.php?Hours-Of-Operation-1

Isn't the page supposed to look exactly like this one? http://72.35.27.78/aboutus.php

THe customer adds a new page... it should look like the main page should it now?

I am confused.

QuietCalm

Re: [QuietCalm] How to let customers add new pages with menu?

I am getting close to the fix and understanding this Dave.. thanks for the help. It is a bit daunting without being a php coder..

Everything seems to be working now except the error at : http://72.35.27.78/categoryList.php?Bus-Tours-5

ERROR: Notice: Undefined index: _isSelected in /var/www/vhosts/lambtonmall.com/categoryList.php on line 62 [url "http://72.35.27.78/categoryList.php?Bus-Tours-5"]Bus Tours[/#800080][/url] Notice: Undefined index: _isSelected in /var/www/vhosts/lambtonmall.com/categoryList.php on line 62


This is line 62:

<!-- category menu --> <?php foreach ($categoryRecords as $categoryRecord): ?> <?php echo str_repeat("&nbsp; &nbsp; &nbsp;", $categoryRecord['depth']); ?> <?php if ($categoryRecord['_isSelected']): ?><b><?php endif; ?> <a href="<?php echo $categoryRecord['_link'] ?>"><?php echo $categoryRecord['name'] ?></a> <?php if ($categoryRecord['_isSelected']): ?></b><?php endif; ?> <br/> <?php endforeach; ?> <!-- /category menu -->

Can you see where I may have gone wrong?

QuietCalm

Re: [Dave] How to let customers add new pages with menu?

I just can't get the menu to work ?

http://72.35.27.78/categoryList.php?About-Us-2

Menu error:

Notice: Undefined index: _isSelected in /var/www/vhosts/lambtonmall.com/categoryList.php on line 71 [url "http://72.35.27.78/categoryList.php?About-Us-2"]About Us[/#800080][/url] Notice: Undefined index: _isSelected in /var/www/vhosts/lambtonmall.com/categoryList.php on line 73
Notice: Undefined variable: selectedCategory in /var/www/vhosts/lambtonmall.com/categoryList.php on line 77 No record selected Notice: Undefined variable: selectedCategory in /var/www/vhosts/lambtonmall.com/categoryList.php on line 81

Attached is the categoryList.php being used.

I really need this to work as it is holding up my project. I have posted the code from your forum, double chekced code from CMS code generator.. I do not understand what the problem is. ?

Anyone know?

QuietCalm

Re: [QuietCalm] How to let customers add new pages with menu?

By ross - January 12, 2009

Hi QuietCalm

Doesn't looks like your attachment made it. Would you mind trying again? I'd like to take a closer look at the code :).

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/