How can I change the category description field in category

More
10 years 9 months ago #44694 by gkhn
Hi there,

I have items in the category view list.
They have descriptions under the item images.
So this description is extracted from the description field.
How can I change it so that it can extract this from another text field that I created before?

Thank you.

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

More
10 years 9 months ago #44696 by ggppdk
Hello

General answer
- drag and drop your field into a position


- but i have feeling that your question is specific to the category layout of the blog FLEXIcontent template


- so duplicate the blog template
- add your field 'myfldname' to 'renderonly' position
a. if you want to change the image extraction SOURCE and use your custom field then do this (get image from another field 'myfldname'):
So find (TWICE) in category_items.php:
Code:
$src = flexicontent_html::extractimagesrc($items[$i]);
and replace with:
Code:
$tmp_descr = new stdClass(); $tmp_descr->introtext = $items[$i]->fields['myfldname']->display; $tmp_descr->fulltext = ''; $src = flexicontent_html::extractimagesrc($tmp_descr); //$src = flexicontent_html::extractimagesrc($items[$i]);

To display your field instead of description,
replace:
Code:
$items[$i]->fields['text']->display
with
Code:
$items[$i]->fields['myfldname']->display

to make any other changes please study the file category_items.php (category_items_html5.php)


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