3 users online. Create an account or sign in to join them.Users

Search

Hi guys, I need your help.

I’m supposed to “Symophonize” a website with a 4-level configurable menu. Namely:

MAIN CATEGORY 1

-> Subcategory 11

-> -> Sub-sub category 111

-> -> -> Item 1111

-> -> -> Item 1112

-> -> -> Item 1113

-> -> Sub-sub category 112

-> -> -> Item 1121

-> Subcategory 12

-> -> Sub-sub category 121

-> -> -> Item 1211

-> -> -> Item 1212

-> -> -> Item 1213

MAIN CATEGORY 2

-> Subcategory 21

-> -> Sub-sub category 211

-> -> -> Item 2111

-> -> -> Item 2112

-> -> -> Item 2113

-> -> Sub-sub category 212

-> -> -> Item 2121

-> Subcategory 22

-> -> Sub-sub category 221

-> -> -> Item 2211

-> -> -> Item 2212

-> -> -> Item 2213

and so on…

An author should be able to add categories on every level, so everything should be as flexible as possible. And now an issue arise: how to make this comfortable and cute?

I’m thinking of 4 sections, every section responsible for every level of menu. But now, adding an item (last level), an author has to choose 1st, 2nd and 3rd category. And of course, when he wants 1st category to be , let’s say, “MAIN CATEGORY 1”, then pickable options for Subsections should be “Subcategory 11” and “Subcategory 12” (not Subcategory 2X, Subcategory 3X, etc). How to do it?

Another issue is ordering. Although all items are in a one table, I would like to order them in little groups (depending on parent-category ID).

I hope you know what I mean :) Tree-structured websites are something extremely common, so I have no doubt that some of you have already tackled the problem. I want to know what approach is the best for it.

Hi, I did something similar with this site:

If you see the url structure I have products as the main category, aluminium as a material, windows as sub-category and then finally the product.

If your interested I can dig out the code I wrote.

You’d better show me your backend :-) That’s all about it, front-end shouldn’t be a trouble.

I’m testing this one: http://symphony-cms.com/download/extensions/view/40360/ Maybe this will save me :)

Yeah I can do tomorrow, about to go to bed now - but if you still need it tomorrow I will dig out what I did for you.

It would be great, fortunately I’m not in haste.

I’m facing the same problem here with a 3-level hierarchy. For each level I made a different section, just like you. Each of these sections links to its parent node through a selectbox link. This way every category knows only about its relative position in the tree (i.e. it’s child of a category from the upper level) and an author doesn’t have to set the whole path down to the product.

I’m thinking of 4 sections, every section responsible for every level of menu. But now, adding an item (last level), an author has to choose 1st, 2nd and 3rd category. And of course, when he wants 1st category to be , let’s say, “MAIN CATEGORY 1”, then pickable options for Subsections should be “Subcategory 11” and “Subcategory 12” (not Subcategory 2X, Subcategory 3X, etc). How to do it?

If you prefer to go ahead with your settings, an interesting experiment would be to build a simplified, customized backend on top of Symphony’s. You can use Section Schemas to get the structure of each section and then write your own events that do all the magic.

If you prefer to go ahead with your settings, an interesting experiment would be to build a simplified, customized backend on top of Symphony’s.

In fact, I’ve been thinking of it and I’m getting to a conclusion that it wouldn’t be so hard to write. Look, there is an extension “Nested Categories” which gives us a new tab with tree structure. If this tree structure would be constructed with links to Entries (of related sections) instead of being eee… “standalone beings”, we would have a beautiful and intuitive backend with easy to build ordering.

Now I’m going to sleep and in the morning, who knows, maybe I will start doing something more than thinking and talking ;)

I’m trying Nested Categories, and it seems to re-implement what I’ve already achieved using three different sections for each level (with the addition that it provides a nice tree view).

I think that a more compact (and elegant) solution would be to make a section with a section link to itself. This way you get a flexible way to build trees. You could then filter categories based on URL params such as $category-1, $category-2, $category-3:

{$category-n:$category-n-1:...:$category-2:$category-1}

It should work, but I’m not sure yet. ;)

@NickToye, Thought you'd wanna know, you've got an XSLT error on 3 of the links at 2nd level deep: Param error

Heh, funny thread. Seems that SBL Combo might be up to it :)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details