Multi-level Category Functions

63 posts by 17 authors in: Forums > CMS Builder
Last Post: December 19, 2011   (RSS)

Re: [Dave] Multi-level Category Functions

Hi Dave,
This sounds brilliant and is probably what I am looking for. Are you able to provide a couple of images of the actual page with the new menu? I haven't yet got my CMSB anywhere near production but am keen to know if this will work for my sites.

Mickey

Re: [Dave] Multi-level Category Functions

By Djulia - August 1, 2008 - edited: August 1, 2008

Hi Dave,

1) I have an error message with showall :

Strict Standards: Only variables should be assigned by reference in /../lib/viewer_functions.php on line 463
Strict Standards: Only variables should be assigned by reference in /../lib/viewer_functions.php on line 464


2) I also have an error message with the use of the SeoUrls option :

Category Viewer (category) errors
Unknown option 'useSeoUrls' specified
Valid option names are: (...)



You have an idea ?

Thank you for your assistance.

Djulia


P.S.: for Mickey (image-level.gif)

Re: [Djulia] Multi-level Category Functions

Thanks Djulia,
Hopefully Dave can sort your problem out soon.

Mickey

Re: [Djulia] Multi-level Category Functions

By Dave - August 1, 2008

Hi Djulia,

Can you attach the viewer file you're using?

And what version of PHP are you using?

Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Multi-level Category Functions

By Djulia - August 1, 2008 - edited: August 1, 2008

I use the file which you propose : categoryList.php.

My version php is: PHP Version 5.2.6

You have an idea ?

Thanks,

Djulia


P.s.: I made a test with version 6 of PHP, but I have an error message (I use the file htaccess by default) :[font "Times New Roman"]

Fatal error: Call to undefined function get_magic_quotes_gpc() in /../lib/init.php on line 72
Attachments:

categorylist_002.php 3K

Re: [Djulia] Multi-level Category Functions

By Dave - August 1, 2008

Hi Djulia,

Thanks for that. I've fixed all the issues you mentioned and updated the viewer_functions.php file in the first post. Try that one and it should work better.

Also for PHP 6, it's still in development so we're not supporting it yet. But when it gets closer to release they'll have a list of functions they've removed and changed and we'll go through and write work arounds to support PHP 4/5/6... :) It will be interesting to see how long PHP 4 sticks around for...

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

Re: [Dave] Multi-level Category Functions

By Djulia - August 1, 2008

Thank you Dave,
The errors are corrected for me. [:)]

I have an observation.

My menu is structured as follows :

Level 1
---Level 2
------Level 3

...and I use the SeoUrls option.

The URL for Level 2 and Level 3 turns over me :
categoryList.php/Level-1-Level-2-Level-3/

It will be possible, with the final version, to obtain:
categoryList.php/Level-1/Level-2/Level-3/

I also wonder about the "id" which accompanies the URL.
It will be possible to remove it ?

Thanks for the feedback.

Djulia

Re: [Djulia] Multi-level Category Functions

By Dave - August 1, 2008

Hi Djulia,

You need to use absolute urls when using SEO urls. Try setting the Viewer Urls under "Section editors" to /categoryList.php or whatever the path from your website root is. That should fix the Level-1-Level-2-Level-3 problem.

Next, you can remove id, but it requires custom php code. For simplicity the viewers look for the record number on the end of the url. So if you had a field for 'filename' say you'd need to parse that out of the url, look up the category with the matching filename, and then set it's record number in the 'selectedCategoryNum' option. You need something unique to match again to know which record or category to load or show as selected.

It's basically the same process as removing the 'id' from any of the viewers.

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

Re: [Dave] Multi-level Category Functions

By Djulia - August 1, 2008 - edited: August 1, 2008

Thank you Dave,

I already tested your proposal, but that does not function.

Even with option SEO on false, I obtain :

for Level-1
/categoryList.php?Level-1

for Level-2
/categoryList.php?Level-1-Level-2

and for Level-3
/categoryList.php?Level-1-Level-2-Level-3

"/" is automatically replaced by "-".

Another idea ?


Thanks,

Djulia