recuperer l'id de la catégorie principale d'un artcile

More
3 years 5 months ago #80472 by rottenberg
Hello,
I would like to retrieve the main category ID of an article in a prefix of another field.
if I put {{item-> categories}} I get 'ARRAY'.
if I put {{item-> categories ## 0}} I get the string entered.

What should I put to retrieve the ID of the article

Thank you in advance for your recommendations
cordially
Michel rottenberg

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #80478 by micker
{{item-> categories ## 0}} yes because flexicontent can do multi crategory
{{item-> id }} return item id

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #80481 by rottenberg
aucun problème pour item->id. Je recupere bien le ID de l'article.

mon problème est la récupération des catégories de l'article.

Si je mets {{item->categories##0}} sans espace entre 'categories ' et '##' ni entre '##' et '0', je récupère ARRAY. Comme il y a d'autres champs dans le prefixe, je recupère 'ARRAY' dans $var[5]
Si je fais un print_r($var[5]) je recupère 'ARRAY'

Commen corriger le problème ?

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #80482 by micker
En fait le soucis c'est ton appel qui est pas possible ... ->catid devrait être plus a propos

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #80483 by rottenberg
cette fois ci cela fonctionne.
J'obtiens bien le ID de la catégorie principale

Merci

Please Log in or Create an account to join the conversation.

More
3 years 5 months ago #80486 by micker
nikel

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 1.530 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline