103 Posts
Osep45
8 years ago
3
Topic

Hi,

How to retrieve the field value of a specific item (id) in a position or variation ?

With jSeblod, I was able to retrieve a value of a specific item like this: CCK_GET_Value (id, 'field_name');

But with Seblod, how can I ?

Thank you in advance !

-------

Bonjour,

Comment récupérer la valeur du champ de tel article (id) en php ?

Avec Jseblod, il suffisait d'écrire ceci : CCK_GET_Value( id_de_l_article, 'nom_du_champ' );

Mais avec Seblod, je ne trouve l'information nulle part...

Merci d'avance !

Get a Book for SEBLOD
1283 Posts
Bucklash
8 years ago
2
Level 1

Hi

Is your field (with the storage set as id ie storage: standard | article | id) in a position in your template (ie in mainbody position or hidden position)?

If it is then :

$cck->getValue('my_field_name')
<br>

or a less used format:

$cck->get('my_field_name')->value

Is that what you mean?

Bucklash

103 Posts
Osep45
8 years ago
1
Level 2

No, it isn't that. I need something like :

$cck->get(ID,'my_field_name')->value

in a template list... but it doesn't work.


My goal is to compare a field value (FIELD A) of the current item visited, with a field value (FIELD B) of the items in a search list (display on the page in a module).

Here is my showcase :

http://www.seblod.com/community/forums/lists-search-types/how-to-set-the-search-fieldb-value-fielda-value-of-the-current-item

4229 Posts
Kadministrator
8 years ago
0
Level 3

There are some functions that can do that, but you should rather use on of solutions described in the answer to your other thread

Get a Book for SEBLOD