248 Posts
Giuse
5 years ago
9
Topic

Hi, after reading of manual (GroupX), user posts and experimentation, I still don't understand the complete setup of GroupX. The manual is concise and forum posts report different solutions.

I will detail here the steps with associated questions and I offer to write an extensive page of tutorial after everything is clear for me.

---

0) Starting point: we want to add a GroupX field called FIELD-GROUPX to an existing content type TYPE-MAIN of object type Article.

.

1) Create a new content type TYPE-REPEAT to hold the fields bundle that will be repeated.

The creation can start from a "Blank" template, the object type must be the same of the TYPE-MAIN so in our case "Article".

We can now close the new content type even if it is still empty.

.

2) Now edit the TYPE-MAIN content type: we add the new field of type "GroupX" and call it FIELD-GROUPX, in "Content Type (Form)" we need to select "TYPE-REPEAT" since that is what we want to repeat, various settings for delete/add buttons and min/max number of repetitions follow (obvious options), storage must be set to "Seblod | Article | groupx_col" where "groupx_col" is the name we want for the new column that is going to be added to our DB table that holds TYPE-MAIN items, this table is named something like #__cck_store_form_typemain. This new column in the DB will hold the repeteable values.

We can close TYPE-MAIN.

.

3) Now back to editing TYPE-REPEAT content type: now we can add the specific fields to be repeated.

Storage for these fields must be in the form "Seblod | Article | groupx_col[]" where "" is a label/tag that changes for each field we create and can be different from the field name. But here is the problem in creating these fields:

  • if we leave the padlock as locked, Seblod will create a new DB table like "#__cck_store_form_typerepeat" and for every field it will add a new column, but that is wrong since the repeatable values do not have to be stored there but in TYPE-MAIN table, in "#__cck_store_form_typemain.groupx_col".
  • if we unlock the padlock, then Seblod will not create a new DB table (fine!) but will add new columns to "#_cck_store_item_content", and again it is not the right place where the values will be written.
  • Storage None may overcome this problem but prevents fields to be searched...

What is the correct setup?

Thanks a lot for your help

Giuse

Get a VIP membership
4229 Posts
Kadministrator
5 years ago
8
Level 1

There is I guess no 100% right way, but  extra table with some columns without any data do no harm as they are never used, so I would say go with recommended storages unless you don't need searches, than None will do.

248 Posts
Giuse
5 years ago
7
Level 2

Ok.., I don't care about extra tables/columns (they can be later deleted) and tried both ways (unlocked fields and locked fields): in both ways the groupX field is actually saved into the DB with the Seblod syntax but after save nothing is displayed: no values in backend, no values in frontend.

The GroupX content type has the fields in all views (admin/site/intro/content), access = public. What is still missing to show a GroupX field?

thanks a lot

Giuse

4229 Posts
Kadministrator
5 years ago
0
Level 3

With storage correctly set, groupX field should display in all views where you add it - you need to add groupX fied itself to the parent content type view/list etc, not just to form

41 Posts
RatingAction
5 years ago
5
Level 3

Were you able to resolve this in the meantime? I have the same problem - the GroupX shows up in the form, but does not save any data.

4229 Posts
Kadministrator
5 years ago
4
Level 4

Please post storage configuration for parent field (GroupX) and child fields (fields in child content type).

41 Posts
RatingAction
5 years ago
3
Level 5

I think I got this now. Name of the parent field is "formate". Storage for the parent field is "SEBLOD ::syntax:: -> Article -> formate". Storage in the child fields is: "SEBLOD ::syntax:: -> Article -> formate[fieldname]".

Problems I had to resolve before I got this to work apart from setting up the storage correctly included:

  • Have SEBLOD create the respective columns using ALTER TABLE -> Add Column
  • Make sure the parent field data type is set to "Text" to avoid truncating the input (also using ALTER TABLE)

It does work great now, though. You can see an example here: http://www.ratingaction.com/index.php/de/filme-und-mehr/filme/machete - The repeating fields below the image gallery on the right labeled "Erhältliche Formate" is rendered using a Group X field.

So this topic is resolved for me, thank you! One thing I still haven't worked out, though, is how to set up a list / search type that lists items based on data stored in Field X / Group X correctly. Maybe a different topic, though.

1283 Posts
Bucklash
5 years ago
2
Level 6

You can do search but in a any one search form you can only have searchable one fieldx or groupx...

41 Posts
RatingAction
5 years ago
1
Level 7

thanks, Bucklash. I only want to search one FieldX. It contains a related article field. This is for a movie site. What I would like to do is list all films that a specific actor has acted in. In the movies content type I have set up a FieldX that allows me to add multiple actor type items. The search should now list all movies that have listed a specific actor. This should then be displayed on the actor‘s article.

I have managed to set this up for main actors, of which there is only one per movie in my content type. I followed James’s morrell‘s tutorial on YT for this, but can’t seem to get it to work for the side actors stored in the FieldX in a separate list item. For the avoidance of doubt: these are two separate list / search items, I’m not trying to do both in the same one. 

1283 Posts
Bucklash
5 years ago
0
Level 8

I think (I do not use these fields) that you

- have the field (not groupx field) in search, then

- match/3 is any word exact (or whatever, will need to experiment and check the sql query via debug in the template config)

- and in the above settings options ie “+” set collection to groupx 

something like that anyway

Get a Book for SEBLOD