Need some template help

More
13 years 9 months ago #8946 by ptcmacedonia
This is my item.php file
Code:
<?php /** * @version 1.5 stable $Id: category_items.php 283 2010-06-12 08:40:34Z emmanuel.danan $ * @package Joomla * @subpackage FLEXIcontent * @copyright (C) 2009 Emmanuel Danan - www.vistamedia.fr * @license GNU/GPL v2 * * FLEXIcontent is a derivative work of the excellent QuickFAQ component * @copyright (C) 2008 Christoph Lukes * see www.schlu.net for more information * * FLEXIcontent is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ 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 ); ?> <?php echo flexicontent_html::editbutton( $this->item, $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 --> <!-- BOF subtitle1 block --> <?php if (isset($this->item->positions['subtitle1'])) : ?> <div class="lineinfo subtitle1"> <?php foreach ($this->item->positions['subtitle1'] as $field) : ?> <span class="element"> <?php if ($field->label) : ?> <span class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> <?php endif; ?> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF subtitle1 block --> <!-- BOF subtitle2 block --> <?php if (isset($this->item->positions['subtitle2'])) : ?> <div class="lineinfo subtitle2"> <?php foreach ($this->item->positions['subtitle2'] as $field) : ?> <span class="element"> <?php if ($field->label) : ?> <span class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> <?php endif; ?> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF subtitle2 block --> <!-- BOF subtitle3 block --> <?php if (isset($this->item->positions['subtitle3'])) : ?> <div class="lineinfo subtitle3"> <?php foreach ($this->item->positions['subtitle3'] as $field) : ?> <span class="element"> <?php if ($field->label) : ?> <span class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></span> <?php endif; ?> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span> </span> <?php endforeach; ?> </div> <?php endif; ?> <!-- EOF subtitle3 block --> <?php if ((isset($this->item->positions['banner']))) : ?> <div class="topblock"> <!-- BOF top block --> <div> <table border="1" bordercolor="#000000" align="center" cellspacing="0"> <tr> <td rowspan="2" colspan="4"> <?php foreach ($this->item->positions['banner'] as $field) : ?> <div><?php echo $field->display; ?></div> <?php endforeach; ?> </td> <td width="206" height="39" colspan="2" align="center"> <?php foreach ($this->item->positions['refstats'] as $field) : ?> <font color="#000000"><b><?php echo $field->label; ?></b></font><br><?php echo $field->display; ?> <?php endforeach; ?> </td> </tr> <tr> <td colspan="2" align="center"> <?php foreach ($this->item->positions['mdate'] as $field) : ?> <font color="#000000"><b><?php echo $field->label; ?></b></font><br><?php echo $field->display; ?> <?php endforeach; ?> </td> </tr> <tr align="center"> <td> <?php foreach ($this->item->positions['ppc'] as $field) : ?> <font color="#000000"><b><?php echo $field->label; ?></b></font><br><?php echo $field->display; ?> <?php endforeach; ?> </td> <td> <?php foreach ($this->item->positions['pprc'] as $field) : ?> <font color="#000000"><b><?php echo $field->label; ?></b></font><br><?php echo $field->display; ?> <?php endforeach; ?> </td> <td> <?php foreach ($this->item->positions['payout'] as $field) : ?> <font color="#000000"><b><?php echo $field->label; ?></b></font><br><?php echo $field->display; ?> <?php endforeach; ?> </td> <td> <?php foreach ($this->item->positions['payouttime'] as $field) : ?> <font color="#000000"><b><?php echo $field->label; ?></b></font><br><?php echo $field->display; ?> <?php endforeach; ?> </td> <td> <?php foreach ($this->item->positions['apd'] as $field) : ?> <font color="#000000"><b><?php echo $field->label; ?></b></font><br><?php echo $field->display; ?> <?php endforeach; ?> </td> <td> <?php foreach ($this->item->positions['pp'] as $field) : ?> <font color="#000000"><b><?php echo $field->label; ?></b></font><br><?php echo $field->display; ?> <?php endforeach; ?> </td> </tr> <tr align="center"> <td colspan="2"> <?php foreach ($this->item->positions['status'] as $field) : ?> <font color="#000000"><b><?php echo $field->label; ?></b></font><br><?php echo $field->display; ?> <?php endforeach; ?> </td> <td colspan="4"> <?php foreach ($this->item->positions['ptpf'] as $field) : ?> <font color="#000000"><b><?php echo $field->label; ?></b></font><br><?php echo $field->display; ?> <?php endforeach; ?> </td> </tr> </table> </div> <!-- EOF top block --> </div> <?php endif; ?> <div class="clear"></div> <?php if (isset($this->item->positions['description'])) : ?> <!-- BOF description --> <div class="description"> <?php foreach ($this->item->positions['description'] as $field) : ?> <?php if ($field->label) : ?> <div class="desc-title"><?php echo $field->label; ?></div> <?php endif; ?> <div class="desc-content"><?php echo $field->display; ?></div> <?php endforeach; ?> </div> <!-- EOF description --> <?php endif; ?> <div class="clear"></div> <?php if (isset($this->item->positions['bottom'])) : ?> <!-- BOF bottom block --> <div class="infoblock <?php echo $this->params->get('bottom_cols', 'two'); ?>cols"> <ul> <?php foreach ($this->item->positions['bottom'] as $field) : ?> <li> <div> <?php if ($field->label) : ?> <div class="label field_<?php echo $field->name; ?>"><?php echo $field->label; ?></div> <?php endif; ?> <div class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></div> </div> </li> <?php endforeach; ?> </ul> </div> <!-- EOF bottom block --> <?php endif; ?> <?php if ($this->params->get('comments')) : ?> <!-- BOF comments --> <div class="comments"> <?php if ($this->params->get('comments') == 1) : if (file_exists(JPATH_SITE.DS.'components'.DS.'com_jcomments'.DS.'jcomments.php')) : require_once(JPATH_SITE.DS.'components'.DS.'com_jcomments'.DS.'jcomments.php'); echo JComments::showComments($this->item->id, 'com_flexicontent', $this->escape($this->item->title)); endif; endif; if ($this->params->get('comments') == 2) : if (file_exists(JPATH_SITE.DS.'plugins'.DS.'content'.DS.'jom_comment_bot.php')) : require_once(JPATH_SITE.DS.'plugins'.DS.'content'.DS.'jom_comment_bot.php'); echo jomcomment($this->item->id, 'com_flexicontent'); endif; endif; ?> </div> <!-- EOF comments --> <?php endif; ?> </div>

This is the item.xml file
Code:
<?xml version="1.0" encoding="utf-8"?> <metadata> <author>Emmanuel Danan</author> <website>www.flexicontent.org</website> <email>emmanuel@vistamedia.fr</email> <license>GPLv2</license> <version>1.1</version> <release>25 november 2009</release> <description>Modular item layout suitable for faq, file manager, or directory</description> <params addpath="/administrator/components/com_flexicontent/elements"> <param name="top_cols" type="list" default="two" label="FLEXI_ITEM_TOP_COLS" description="FLEXI_ITEM_TOP_COLS_DESC"> <option value="">Use Global</option> <option value="one">FLEXI_1_COL</option> <option value="two">FLEXI_2_COLS</option> </param> <param name="bottom_cols" type="list" default="two" label="FLEXI_ITEM_BOTTOM_COLS" description="FLEXI_ITEM_BOTTOM_COLS_DESC"> <option value="">Use Global</option> <option value="one">FLEXI_1_COL</option> <option value="two">FLEXI_2_COLS</option> </param> </params> <fieldgroups> <group>subtitle1</group> <group>subtitle2</group> <group>subtitle3</group> <group>banner</group> <group>refstats</group> <group>mdate</group> <group>ppc</group> <group>pprc</group> <group>payout</group> <group>payouttime</group> <group>apd</group> <group>pp</group> <group>status</group> <group>ptpf</group> <group>description</group> <group>bottom</group> </fieldgroups> <cssitem> <file>css/item.css</file> </cssitem> <jsitem> </jsitem> </metadata>


with this template i get this error
[img


Can someone help me?
Thanks

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

More
13 years 9 months ago #8947 by micker
Replied by micker on topic Need some template help
hello you do a error
to load a position the code is
Code:
<!-- BOF yourposition --> <div id="stade_entete"> <?php if (isset($this->item->positions['yourposition'])) : ?> <?php foreach ($this->item->positions['yourposition'] as $champ) : ?> <div class="champ_<?php echo $champ->name; ?>"> <?php if ($champ->label) : ?> <div class="etiquette"><?php echo $champ->label; ?></div> <?php endif; ?> <div class="valeur"><?php echo $champ->display; ?></div> </div> <?php endforeach; ?> <?php endif; ?> </div> <!-- EOF yourposition -->
and in your admin template drag and drop your field
a great tuto in french
blog.netassopro.com/tutoriel-tem ... e-contenu/
regards

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
13 years 9 months ago #8950 by ptcmacedonia
Thanks a lot. This fixed the problem

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

More
13 years 9 months ago #8951 by micker
Replied by micker on topic Need some template help
cool welcom on board !

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