Titre automatique

More
5 years 7 months ago - 5 years 7 months ago #74575 by Teamherve
Titre automatique was created by Teamherve
Question
Je souhaiterai que le titre s'affiche automatiquement, sans avoir à le nommer.
Je vois une fonction Titre Automatique.

Configuration TITRE AUTOMATIQUE
TYPE/CHAMPS SYSTEME/
parametre de modification
Code:
$F = & $item->fields;$txt = isset( $F['fieldname01'] )  ?  $F['fieldname01']->postdata[0]  :  'fieldname01 field not found';return $txt;

Je change fieldname par le champs voulu.
Mais cela apparait toujours 
fieldname01 field not found
Last edit: 5 years 7 months ago by ggppdk.

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

More
5 years 7 months ago #74577 by micker
Replied by micker on topic Titre automatique
formate ton caide avec la balise [code] sinon c'est difficile a lire

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
5 years 7 months ago #74584 by ggppdk
Replied by ggppdk on topic Titre automatique
Hello

you changed the field name but you did not change the message text
so think of message text as "The name you entered was not found"

so better
- that you also change the error message to "The field name you entered was not found"

so please check the field name probably you entered it wrong , e.g. you entered a field label, but you must enter a fieldname


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
5 years 7 months ago #74585 by Teamherve
Replied by Teamherve on topic Titre automatique
Bonsoir,

Si je comprends bien le principe

Je souhaite afficher le titre automatique
Ce titre que je veux soit par exemple le Prenom
si mon champs Prenom (etiquette) a le nom de champ champ40pe
field label : Prenom
fieldname : champ40pe

je change 'fieldname01' par 'champ40pe'
Code:
[code]$F = & $item->fields;
Code:
$txt = isset( $F['champ40pe'] )
Code:
  ?  $F['champ40pe']->postdata[0]
Code:
  :  'fieldname01 field not found';
Code:
return $txt;
[/code]
Helas, cela donne un numero
Numero equivalent à ID item

J'ai fais 3 tests
Test 1, le titre est 135
Test 2  le titre est 136
Test 3  le titre est 137

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

More
5 years 7 months ago - 5 years 7 months ago #74592 by Teamherve
Replied by Teamherve on topic Titre automatique
Bonjour,

Très étrange, cela fonctionne à l'instant sans que je retouche rien.

EXPLICATION DE MON ERREUR :

Quand je changeai le champ dans TYPE
Je regardais les titre déjà présent sur mon site
Hors il faut faire enregistrer article par article pour que la modification soit prise en compte.

QUESTION supllémentaire
Est-il possible que ce champs soit composé de plusieurs champs

J'ai essayer de faire un champ
champ01 : composé de champnom, champprenom

Mais si je reporte champ01
cela m'indique dans ce cas :
Non pas : nom, prenom
Mais : numero id de l'item
Code:
$F = & $item->fields;
Code:
$txt = isset( $F['champ70pe'] )
Code:
  ?  $F['champ70pe']->postdata[0]
Code:
  :  'nom non trouvé';
Code:
return $txt;
Code:



Hervé
Last edit: 5 years 7 months ago by Teamherve.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.555 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