Code to display parent category, item title, description title

More
7 years 8 months ago #66791 by Laurentfrom47
Hello,

witch php code i can use to display for example in a textarea field the current :

<div>Current Parent Category title</div>
<h1>Current item title</h1>
<div>Current description title</div>

Thanks for help.

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

More
7 years 8 months ago #66792 by micker
sorry i don't undesrtand you want a default text in a field for form ?

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
7 years 8 months ago - 7 years 8 months ago #66797 by Laurentfrom47
Bonjour,

Je souhaite un code php pour pouvoir afficher la catégorie grand parente, le titre et la description de l'item courant ?
Pour l'utiliser dans un template éventuellement.

J'ai trouvé ce code là qui affiche la catégorie parente et la sous catégorie, c'est un début :
Code:
global $globalcats; $cid = JRequest::getInt('cid'); if ($cid) { foreach ($globalcats[$cid]->ancestorsarray as $ancestor_catid) { $ancestor_title_arr[] = $globalcats[$ancestor_catid]->title; } $page_title = implode(" :: ", $ancestor_title_arr); //$page_title .= $this->item->title; $jdoc = & JFactory::getDocument(); $jdoc->setTitle($page_title); }

il me manque le titre de l'item et la description et ce code affiche la catégorie parente et la sous catégorie, moi je n'ai besoin que de la catégorie parente.

Ou ce qui m'irait aussi c'est utiliser le champ catégorie mais il n'affiche pas la catégorie parente.

En pièce jointe ce que je souhaite faire.



Merci.
Attachments:
Last edit: 7 years 8 months ago by Laurentfrom47.

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

More
7 years 8 months ago #66804 by micker
alors ....
pour afficher le nom de catégorie tu peus mettre ton champs dans une position
le nom de l'article $this->item->title;
la description $this->item->text;
reagrde comment les template d'item sont fait tu comprendras

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: 0.453 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