Go Back   Mosets Community > Archives > Mosets Tree 2.2 > Discussions, Troubleshooting & Problems

 
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-07-2015, 05:10 PM
gabrielegodano gabrielegodano is offline
Mosets'd
 
Join Date: Mar 2009
Posts: 12
Default isolate custom fields inside a div

Hallo, I'm stucked in a little problem:
I need help to modify mod_mt_listing/ tmpl/ _fields.php
I'm not practise of php, so I apologize for a "stupid" question.

In my custom field array I want only some specifics id to stay in a separate div:


// Custom fields
$displayfields = $params->get( 'fields', array() );
if( !is_array($displayfields) ) {
$displayfields = array($displayfields);
}

if( !empty($displayfields) && isset($fields[$l->link_id]) )
{
echo '<ul class="listaCF">';

$fields[$l->link_id]->resetPointer();
while( $fields[$l->link_id]->hasNext() ) {
$field = $fields[$l->link_id]->getField();
if( in_array($field->getId(2),$displayfields) && $field->hasValue() )
{
echo '<li>';
if($field->hasCaption() && !in_array($field->getName(),$hide_caption)) {
// echo $field->getCaption();

}
$value = $field->getOutput(2);
echo $value;
echo '</li>';
}
$fields[$l->link_id]->next();
}
echo '</ul>';
}

I want id 2, 3 and 33 to stay in a specific <div>
and others in another div

how can I do that?
I tried by myself but every time I only get a white screen

Thank you so much

Last edited by gabrielegodano; 10-07-2015 at 05:49 PM.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +8. The time now is 12:13 PM.

Copyright © 2005-2010 Mosets Consulting

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.