85 Posts
yuberlin
11 years ago
Topic

Since SEBLOD 3.x i'm unable to call groupx fields. Here is what i did:


1.)
- Add new content type with 3 fields (Text, WYSIWYG, Image Upload)
- Save each of them: Custom | Article | my_field (alter: var255, add column to table)

1.1.) unpublished content type

2.)
- Add Groupx to my final content type, provided content type from 1
- Saved: Custom | Article | my_groupx (alter: text, add column to table)

Content is saved correctly when adding in form. I see all entries in database. But there is no way to show it. I tried standard way (template seb_one) in introview. I tried custom template and called groupx like descriped here: http://www.seblod.com/v2/documentation/seblod-2x/templates/1994-calling-fieldx-and-groupx.html But nothings works. The groupx field stays invisible...


I used groupx before in seblod 2, but since version 3 i really have problems calling it in my templates.

Please provide a documentation about using (and saving correctly!) these fields.

Get a Book for SEBLOD
151 Posts
pixelpixel
11 years ago
0
Level 1

Hi yuberlin,

i`m not sure but i guess in Version 3 we have to call our GroupX with the alias of the field we assign to it. Example:

Content Type: MyGroupX (alias:mygroupx) -> worked fine in V2 when we called it with something like that

...cck->get( 'mygroupx' )->value...
Field (from your final content type): MyField (alias:myfield; GroupX is assigned to this field) -> works with

...cck->get( 'myfield' )->value...
Again i`m not sure if this is right, but i remember that i also had the same issue and it worked this way :)

11 years ago
9
Level 1

Hello yuberlin,

it's normal, you don't do well with groupX and custom storage.


For custom storage, the syntaxe is :

custom | article | database_field_name [field_name]
 you don't need to unpublish the group, it's not necessary, but you can.


In the group you must fill all views (intro, content) to be able to display the group in a intro or content view.


You say :
alter: var255, add column to table



SEBLOD, by default, store data in VARCHAR(255), so you don't need to do that.
And the bad thing to do, is to "Add column to table" => don't hack Joomla!, let SEBLOD managing his own table.

Then before playing with custom template, be sure that your groupX work well with seb_one.

Best regards.
Lionel

85 Posts
yuberlin
11 years ago
8
Level 2

I guess that was the problem:
In the group you must fill all views (intro, content) to be able to display the group in a intro or content view.

(Before i was thinking the fields collected in the groupx actually dont have to be assigned to a view. So groupx is the wrapper and only needs to be assigned to the view.)

40 Posts
philippe_du_56
11 years ago
7
Level 3

Hello,

I want to display personalized content "site" with GroupX field.

My concern is that I can not create a custom field  GroupX  in the  tremplate "site" with the button + -

I did in version 1 but I can not do

can you please help me?

85 Posts
Jpeg
11 years ago
6
Level 4

Bonjour Philippe,

il serait préférable que tu poste un nouveau topic.

il faut créer au part avant, un type de contenu pour ton groupx avec les champs que tu veux dedans, puis tu crées un groupx dans ton formulaire site de ton contenu principal qui lui va appeler le type de contenu créé avant. Quand tu vas créer/éditer un contenu tu vas retrouver tes fameux boutons +/- ^^

Jpeg

40 Posts
philippe_du_56
11 years ago
5
Level 5

Bonjour jpg


merci mais cela j'arrive à le faire  ce que je cherche à faire  c'est d'appeler dans le formulaire site avec un template  personnalisé  le champ  groupx  pour pouvoir faire la mise en  forme.

comme j'avais fait avec la version 1 mais là je vois pas!!


Phil

85 Posts
Jpeg
11 years ago
4
Level 6

Bonjour Philippe

foreach($cck->get( 'nameofgroupx' )->value as $gx){
      echo  $gx['fieldingroupx']->value;
}

tu avais plein de réponse sur l'ancien forum :)

Jpeg

40 Posts
philippe_du_56
11 years ago
3
Level 7

je vais essayer mais il me semble qu'avec ce code  cela n'incrémente pas les boutons  afin de rajouter une ligne si on a besoin


j'essai !


merci


85 Posts
Jpeg
11 years ago
2
Level 8

je viens de comprendre ce que tu veux désolé...

il faut que tu fasse un template custom du type de contenu de ton groupx, tu ne peux pas le faire dans ton template custom général.

Jpeg


40 Posts
philippe_du_56
11 years ago
1
Level 9

Re,


On avance  cela fonctionne comme ceci j'ai les champs de formulaire:

foreach($cck->get('parametres_competence')->form as $gx){
  echo  $gx['ref_competence']->form;
    echo  $gx['competence']->form;
}

Maintenant il me faut le code pour incrémenter les boutons, je sais que pour la version 1 fallait la rajouter.


je connais pas le code pour cette version!


Phil




10 years ago
0
Level 10
Salut philippe.
Dsl du poste après 9mois, mais aurais-tu une reponse pour incrémenter les boutons ?
Merci,
Dam
Get a VIP membership