Search

@designermonkey thx. I might get this all wrong but I am actually using it with the following url parameters: category/category.

Using the exact same parameter name (‘category’) sets the param $category to the last defined value: example.com/fruit/apple/ would result in $category being ‘apple’. This is all I need (the ‘current’ category is all I need to filter my DS).

Again: I’m not entirely confident that I’m not missing something important, but this seems(!) to fit my needs.

At the moment I’m struggling with the fact that my ‘categories’ actually need some content (description, image). As a result I’m forced to use a ‘proxy’ category and use that.

Actually, I take the above back. I am running into trouble ;-)

I’m using the Nested Cats extension and my current structure should allow for /category/subcategory/sub-subcategory/product

(At the moment that’s as deep as the structure goes, but ideally the amount of sub-categories was flexible)

I’ve set up /category/ as a standard Page (‘components’), with the following url-parameters: /category/category/product

Attached to this ‘components’ page is a ‘category’ DS (actually a ‘proxy section’ allowing me to add content to the category).

My page params are set fine: I have a $category and/or $product when set in the URL.

Regarding my DS: I need to have ‘overview’ pages (when only a $category is available) that show all sub-categories. Besides this I need a ‘detail’ page for when I have a $product.

My filtering works logical: URL /components/foo gives me back all products with a ‘foo’ category and the ‘foo’ category itself.

However: as I said in this case I need an overview of all sub-categories of ‘foo’ (and no products).

I hope I can make my challenge clear enough :-/

I’d love to be able to have 1 flexible page (‘components’) that uses just 1 or 2 DS’es (‘Categories’ and ‘Products’) but can give me either an overview of sub-categories or the actual product based on the URL parameters.

@andrrr I’ve run into trouble again…When tryin to start my category tree from a certain level in a section, I get an error from the commit function from field.nestedcats.php:

$this->createSectionAssociation(NULL, $id, $field_id);

It’s balking on the NULL value being passed, it won’t accept NULL in the section associations table.

Setting it to '0' fixes it, but I don’t think it’s right.

Is there any way to output the parent id in the datasource output from a section? I can see it’s being done in the custom nested cats datasource, but is it possible for output from a section?

I’ve had a look at the $data being passed into appendFormattedElement() from field.nestedcats.php and it isn’t present, but as I don’t know where this data comes from…

A client site has very similar needs to those of davidhund, above. I’d be interested to know if any progress has/will be made. :)

I’m implementing a (two-level-)nested category system using:

  • Two sections (parent and child)
  • Select box field to link them
  • Reflection Field to concatenate both titles in a hidden field for each child
  • Select box/Reference Field to link to the child category using said reflection field as the value.

The result is one single select box for each article that offers me values like

  • Literature: Reviews
  • Literature: Author-Interviews
  • Articles: Scientific Papers
  • Articles: Prose
  • etc.

@phoque: Ha! It’s amazing to see what can be done with a few extra field-types in Symphony. Thanks.

I'm having some issues with editing existing Sections that have a Nested Category field assigned to them.

On submission, I'm given a Column 'parent_section_id' cannot be null Fatal Error, and it looks like it's due to this extension. In /fields/field.nestedcats.php on line 221 - 223.

foreach($this->get('related_field_id') as $field_id){
                $this->createSectionAssociation(NULL, $id, $field_id);
            }

Anyone have any ideas by chance? It can't be NULL, but I'm lost as to what it should be.

I've forked this module with changes as I didn't find it that intuitive for my needs and it would confuse my clients.

https://github.com/justify/nestedcats

Will have someone look at the JS for better usability but be interested to hear any critical feedback.

(Don't upgrade, new installations only - will correct the datasource and commit later today/tomo).

UPDATE: Rebuilt buildDSRetrival to handle multiple instances of the same word, i.e. /gifts/bags and /shop/bags but won't allow multiple categories on the same level unless they are subs. Use 'match:$first,$second,$third' as your DS filter. There will be bugs as I've not tested fully.

Hi.

I changed a little bit and put a extension there and there.

I've added two new fields (keywords, description) and a little touched up CSS.

Sorry for my English.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details