Récuperer la valeur d'un champ select list

More
9 years 6 months ago #49828 by m.raulin
Bonjour à tous,

Je suis entrain de créer un template pour une vue d'article.
Donc j'ai crée un champ select list avec :
- la recherche simple et filtre activée
- la recherche avancée et filtre activée
- j'ai choisi mon type associé
- j'ai indiqué les différentes valeurs :
3::Vidéo%%2::Photo%%
1::Perfectionnement%% 0::Initiation%%
- j'ai également choisi d'afficher la valeur,
- j'ai aussi configuré les filtres pour une vue de catégorie

Mais ma valeur sélectionné ne s'affiche pas dans ma vue de mon article.
Dans le fichier item.php, j'ai indiqué :
Code:
<?php defined( '_JEXEC' ) or die( 'Restricted access' ); // first define the template name $tmpl = $this->tmpl; ?> <div id="flexicontent" class="flexicontent item<?php echo $this->item->id; ?> type<?php echo $this->item->type_id; ?>"> <!-- BOF buttons --> <p class="buttons"> <?php echo flexicontent_html::pdfbutton( $this->item, $this->params ); ?> <?php echo flexicontent_html::mailbutton( 'items', $this->params, null , $this->item->slug ); ?> <?php echo flexicontent_html::printbutton( $this->print_link, $this->params ); ?> </p> <!-- EOF buttons --> <!-- BOF page title --> <?php if ($this->params->get( 'show_page_title', 1 ) && $this->params->get('page_title') != $this->item->title) : ?> <h1 class="componentheading"> <?php echo $this->params->get('page_title'); ?> </h1> <?php endif; ?> <!-- EOF page title --> <!-- BOF item title --> <?php if ($this->params->get('show_title', 1)) : ?> <h2 class="contentheading flexicontent"> <?php echo $this->escape($this->item->title); ?> </h2> <?php endif; ?> <!-- EOF item title --> <div class="clear"></div> <div class="atelier_tic"> <span class="commune"><?php echo $this->fields['communes_tic']->display; ?></span> <span class="type"><?php echo $this->fields['type_tic']->display; ?></span> <div class="periode"> <h4 class="type"><?php echo $this->fields['field67']->display; ?></h4> </div> <div class="description"> <p><?php echo $this->fields['field69']->display; ?></p> <span class="prog"><?php echo $this->fields['field68']->display; ?> </div> </div> <div class="clear"></div> </div>

J'ai regardé encore et encore, je n'ai pas trouvé d'où venait le problème ?

Pouvez-vous m'aider ?

Merci

Cordialement

Magali

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

More
9 years 6 months ago #49829 by ggppdk
Hello

i don't understand what you have done by reading the translation

so i ask:

1. you have duplicate a built-in template and you are customizing the code of the item.php file (ITEM VIEW) ?

2. have you added the field in a template position in the
item layout of your custom template ?


-- 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
9 years 6 months ago #49832 by micker
je te conseille plustot que charger 1 champ créer une position et de glissé tes champs dedans c'est plus pratique et plus evolutif
pour mettre des classe dans tes champs utilise les valeur prefix suffi et ouverture fermeture

apres pour ton champs je ne comprend pas ... ou est le code de ton champs associé ?

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
9 years 6 months ago #49834 by m.raulin
J'ai posté mon problème dans la partie française Mais je ne comprend ce que tu veux dire par classes, suffix et prefix.

Merci

Magali

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

More
9 years 6 months ago #49835 by m.raulin
Hello,

I speak very bad english sorry !
- I have duplicate template and i renamed "atelier_tic"
- I redid the file item.xml but positions:
<?xml version="1.0" encoding="utf-8"?>
<form>
<author>Magali </author>
<website>www. .fr</website>
<email> </email>
<license>GPLv2</license>
<version>1.1</version>
<release>1 octobre 2014</release>
<description>Template pour afficher les informations sur un atelier TIC</description>
<fields name="attribs">
<fieldset name="attribs" addfieldpath="/administrator/components/com_flexicontent/elements">
<field name="title_cut_text" type="text" size="3" default="200" label="FLEXI_TITLE_MAXLEN" description="FLEXI_TITLE_MAXLEN_DESC" />
<field name="top_cols" type="list" default="two" label="FLEXI_ITEM_TOP_COLS" description="FLEXI_ITEM_TOP_COLS_DESC">
<option value="">FLEXI_USE_GLOBAL</option>
<option value="one">FLEXI_1_COL</option>
<option value="two">FLEXI_2_COLS</option>
</field>
<field name="bottom_cols" type="list" default="two" label="FLEXI_ITEM_BOTTOM_COLS" description="FLEXI_ITEM_BOTTOM_COLS_DESC">
<option value="">FLEXI_USE_GLOBAL</option>
<option value="one">FLEXI_1_COL</option>
<option value="two">FLEXI_2_COLS</option>
</field>

<field name="subtitle_tabs_grp" type="separator" default="SubTitle Tabs" description="" level="level2" hr="false" />
<field name="subtitle_tab1_label" type="text" default="TAB01" label="Label for Tab 1" description="The text for this label is filter via JText (you can add to your ini language files)" />
<field name="subtitle_tab2_label" type="text" default="TAB02" label="Label for Tab 2" description="The text for this label is filter via JText (you can add to your ini language files)" />
<field name="subtitle_tab3_label" type="text" default="TAB03" label="Label for Tab 3" description="The text for this label is filter via JText (you can add to your ini language files)" />
<field name="subtitle_tab4_label" type="text" default="TAB04" label="Label for Tab 4" description="The text for this label is filter via JText (you can add to your ini language files)" />
<field name="subtitle_tab5_label" type="text" default="TAB05" label="Label for Tab 5" description="The text for this label is filter via JText (you can add to your ini language files)" />
<field name="subtitle_tab6_label" type="text" default="TAB06" label="Label for Tab 6" description="The text for this label is filter via JText (you can add to your ini language files)" />

<field name="bottom_tabs_grp" type="separator" default="Bottom Tabs" description="" level="level2" hr="false" />
<field name="bottom_tab1_label" type="text" default="TAB01" label="Label for Tab 1" description="The text for this label is filter via JText (you can add to your ini language files)" />
<field name="bottom_tab2_label" type="text" default="TAB02" label="Label for Tab 2" description="The text for this label is filter via JText (you can add to your ini language files)" />
<field name="bottom_tab3_label" type="text" default="TAB03" label="Label for Tab 3" description="The text for this label is filter via JText (you can add to your ini language files)" />
<field name="bottom_tab4_label" type="text" default="TAB04" label="Label for Tab 4" description="The text for this label is filter via JText (you can add to your ini language files)" />
<field name="bottom_tab5_label" type="text" default="TAB05" label="Label for Tab 5" description="The text for this label is filter via JText (you can add to your ini language files)" />
<field name="bottom_tab6_label" type="text" default="TAB06" label="Label for Tab 6" description="The text for this label is filter via JText (you can add to your ini language files)" />

<field name="templatehtmlmode" type="separator" hr="false" default="FLEXI_TEMPLATE_HTML_MODE" level="level2" menu="hide" />
<field name="htmlmode" type="list" default="0" label="FLEXI_HTML_MODE" description="FLEXI_HTML_MODE_DESC" filter="int">
<option value="0">FLEXI_XHTML</option>
<option value="1">FLEXI_HTML5</option>
</field>
</fieldset>
</fields>
<fieldgroups>
<group>communes</group>
<group>initiations</group>
<group>periode</group>
<group>description</group>
<group>programme</group>
</fieldgroups>
<cssitem>
<file>css/item.css</file>
</cssitem>
<jsitem>
</jsitem>
</form>
- I realized the file item.php with the class but post up in article

I write the post in the part Forum French

Thank You

Magali

ggppdk wrote: Hello

i don't understand what you have done by reading the translation

so i ask:

1. you have duplicate a built-in template and you are customizing the code of the item.php file (ITEM VIEW) ?

2. have you added the field in a template position in the
item layout of your custom template ?


He

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

More
9 years 6 months ago #49836 by ggppdk
Hello

after modify any XML file of templates,

you need to clean cache in J2.5,

so that new template positions appear in the FLEXIcontent template layout editor


-- 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.

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