Call specific custom fields in items and useritems view

edited November 2017 in DJ-Classifieds
Hello,
i`m trying to display specific custom fields in the items view and the useritems view.
My Solution was this: (but i can`t specify my custom field)

<?php
for($cf_i=0;$cf_i<count($cf_active_col);$cf_i++){

if(isset($i->fields[$cf_active_col[$cf_i]])){
if($this->custom_fields[$cf_active_col[$cf_i]]->type=='checkbox'){
$art = str_ireplace(';', ', ', substr($i->fields[$cf_active_col[$cf_i]],1,-1));
}
}
echo $art;
} ?>

It works only in the items view and not in the useritems?

Thanks

Comments

  • Hello

    This happens because in useritems model custom fields are not taken from database.
    Please copy code from components/com_djclassifieds/models/items.php 374-378 and 407-463 to items model components/com_djclassifieds/models/items.php .

    Best Regards,
    Lukasz
  • Hello, sorry for the late response, but i can`t find the code? In these Lines are unrelevant code for that.
    I know you mean "copy from model items.php to model useritems.php :smile: .

    Thanks!
  • Hello

    Please contact us on help desc and give website credentials we will try to modify your files.

    Best Regards,
    Lukasz
  • Hello,
    i`m in development and the site is not online now. I will search again in models.

    Thanks
  • I got it!

    Thanks!
  • Woot woot! great :)!
  • great to hear :) I'm glad that you resolve this.

    Best Regards,
    Lukasz
Sign In or Register to comment.