[solved]Description and an Image field in the same zone.

More
16 years 1 day ago #3361 by kspoddar
Hi - I would like to have an image field in the same zone as description.

The text would wrap around the image. I tried to do this but failed.

I am unable to identify the class so that I could can change the CSS. I am using JA Purity as a template.

I have tried to change the div.description and div.desc-content but just cant seem to manage. The other class where you can change is the img.hasTips but the problem is that affects all the images.

Request your help.

I am providing a link here for the example - recipes.feastguru.com/testing/image-testing.html

Cheers!
Kirti

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

More
16 years 1 day ago #3364 by yopyop001
Hi,

To do that, you have to modify the template.

Here is a quick way to do that :

In the item.php, you add:
Code:
<!-- BOF descriptionimage block --> <?php if (isset($this->item->positions['descriptionimage'])) : ?> <?php foreach ($this->item->positions['descriptionimage'] as $field) : ?> <div class="descriptionimage field_<?php echo $field->name; ?>"> <?php echo $field->display; ?> <div class="clear"></div> </div> <?php endforeach; ?> <?php endif; ?> <!-- EOF descriptionimage block -->
just after
Code:
<!-- BOF description --> <div class="description">

In your item.xml file, you add :
Code:
<group>descriptionimage</group>
just after
Code:
<group>top</group>

Now, you have a new zone in your template where you can add your image fields in the flexicontent template manager

And in your item.css, you add :
Code:
div.descriptionimage{ float:left; /* for example */ /*and all your css attributes*/ }

I hope it's clear.
If not, ask us.

Rgds

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

More
16 years 1 day ago #3374 by kspoddar
Wow! That did the trick.

Not only is FLEXIcontent a fabulous product but your support is awesome!

You guys rock! Keep it up and thanks a million!

Regards
Kirti

Cheers!
Kirti

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

More
15 years 8 months ago #7308 by d4rkcloud
Hi,

i've got a problem...
i tried to do everything as you told, but it doesn't display anything. :(
This is the URL:
bozze.joomlafree.it/index.php?option=com...items&cid=567&id=554
I created an image field, i modified item.php, item.css and item.xml, now it give descriptionimage in the backend template, but doesn't display anything in frontend.
This is my actual item.php:
Code:
<?php /** * @version 1.5 stable $Id: default.php 85 2009-10-10 13:48:04Z vistamedia $ * @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 ); ?> </p> <!-- EOF buttons --> <!-- BOF page title --> <!-- 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['image'])) || (isset($this->item->positions['top']))) : ?> <div class="topblock"> <!-- BOF image block --> <?php if (isset($this->item->positions['image'])) : ?> <?php foreach ($this->item->positions['image'] as $field) : ?> <div class="image field_<?php echo $field->name; ?>"> <?php echo $field->display; ?> <div class="clear"></div> </div> <?php endforeach; ?> <?php endif; ?> <!-- EOF image block --> <?php if (isset($this->item->positions['top'])) : ?> <!-- BOF top block --> <div class="infoblock <?php echo $this->params->get('top_cols', 'two'); ?>cols"> <ul> <?php foreach ($this->item->positions['top'] 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 top block --> <?php endif; ?> </div> <?php endif; ?> <div class="clear"></div> <?php if (isset($this->item->positions['description'])) : ?> <!-- BOF description --> <div class="description"> <!-- BOF descriptionimage block --> <?php if (isset($this->item->positions['descriptionimage'])) : ?> <?php foreach ($this->item->positions['descriptionimage'] as $field) : ?> <div class="descriptionimage field_<?php echo $field->name; ?>"> <?php echo $field->display; ?> <div class="clear"></div> </div> <?php endforeach; ?> <?php endif; ?> <!-- EOF descriptionimage block --> <?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>
I use default layout, 2 columns.
Can you tell why it doesn't work?

Thanks! :mrgreen:

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

More
15 years 8 months ago #7313 by yopyop001
Hi,

Are you sure you have put description and descriptionimage field in the position through the template manager?

If you want you can give me an admin access to your site by PM to have a look.

Regards

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

More
15 years 8 months ago #7319 by d4rkcloud

yopyop001 wrote: Hi,

Are you sure you have put description and descriptionimage field in the position through the template manager?

If you want you can give me an admin access to your site by PM to have a look.

Regards


You're great!
I'll do it right now!

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

More
15 years 8 months ago #7330 by d4rkcloud
Now it worked.
Thank you so much!!! :mrgreen:

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

More
14 years 6 days ago - 14 years 5 days ago #22222 by mcampos
hello,

i've done the same... but the new zone in the backend is not showing !!!

i have the release 1.5.6 of flexicontent!!

can you help me ???

best regards

Micael Campos
Last edit: 14 years 5 days ago by mcampos.

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

More
14 years 6 days ago #22224 by ggppdk
The template positions are cached, please clear your joomla cache.

I think this causes confusion quite often, maybe we should clear the templates cache when opening the templates for edit.

Regards


-- 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 review. Thanks!

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

More
14 years 5 days ago #22231 by micker
small problem small solution
hop in faq
here
flexicontent.org/documentation/f ... ckend.html

think to edit your title post and add [solved]
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.

Moderators: vistamediajoomlacornerggppdk
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
Save