Plugin

Developer
Supported

Field Value

ExpressionEngine 1.x, ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Laisvunas

     

You must be logged in to post.

Field Values now showing with Child Categories

Support Request

Forrest
Forrest

Hi Laisvunas,

I purchased your Field Value Plugin to use together with Child Categories per your recommendation. I configured it as follows but do not get any values showing up:

{exp:child_categories  parent="451|362|361|360|359|358|357|356|343|484|354|353|352|351|332|350|349|363" child_categories_sort_by="custom" channel="quarterly_report" child_categories_sort_direction="asc" show_empty="yes"  entries_start_on="2011-10-10" entries_end_on="2012-01-09" parse="inward" site="3"}
    
  {parent_category_start}
<h3 >{parent_category_name}</h3>{parent_category_end}
  
  {child_category_start}
   
<p>{child_category_name} &mdashreports{entries_total}</h3>
  
{child_category_end}
  
  {entries_wrapper_top_start}
<div>{entries_wrapper_top_end}
   {entries_start}
    {exp
:field_value entry_id="{entry_id}"}
     
<a  href="{site_url}reports/detail/{url_title}">{title}</a> &mdash; for {report_year}&ndash;{report_quarter}<br />
    
{/exp:field_value}
   {entries_end}
  {entries_wrapper_bottom_start}
</div>{entries_wrapper_bottom_end}
  {
/exp:child_categories} 

Please advise on how to get the two custom field to show. Thanks.

Forrest

Laisvunas
# 1
Developer
Laisvunas

Hi Forrest,

The variables should be not {report_year} and {report_quarter}

but

{field_value_report_year}  {field_value_report_quarter} 
Forrest
# 2
Forrest

Hi Laisvunas,

I appreciate your response, but when I insert that code as follows I get an error on the page.

Here is the code:

{entries_start}
 {exp
:field_value entry_id="{entry_id}"}
 
<a  href="{site_url}reports/detail/{url_title}">{title}</a> &mdash; for {field_value_report_year}&ndash;{field_value_report_quarter}<br />
 
{/exp:field_value}
{entries_end} 

Here is the error I get:

Error Number: 1054

Unknown column ‘exp_channel_data.field_id_’ in ‘field list’

SELECT exp_channel_titles.entry_id, exp_channels.channel_name, exp_channels.channel_html_formatting, exp_channels.channel_allow_img_urls, exp_channels.channel_auto_link_urls, exp_channel_data.field_id_, field_ft_ FROM exp_channel_data INNER JOIN exp_channel_titles ON exp_channel_data.entry_id = exp_channel_titles.entry_id INNER JOIN exp_channels ON exp_channel_titles.channel_id = exp_channels.channel_id WHERE exp_channel_data.entry_id = ‘2742’ LIMIT 1

Filename: third_party/field_value/pi.field_value.php

Line Number: 213

One other thing that would be really helpful. If the field values are supposed to be entered with a prefix of field_value_ why isn’t that in the documentation?

Thanks.

Forrest

Laisvunas
# 3
Developer
Laisvunas

Hi Forrest,

It seems that the problem is caused by this: exp:child_categories has parameter

site="3" 

but the plugin Field Value assumes that the site is “1”. So, add parameter

site="3" 

to the tag exp:field_value and tell me if problems persist.

One other thing that would be really helpful. If the field values are supposed to be entered with a prefix of field_value_ why isn’t that in the documentation?

This is in documentation. In docs you can read

As a single variable can be used any field name of the entry
with “field_value_” added at the beginning. For example if entry
has such fields as “article_body” and “formatted_title” we can
use such single variables as {field_value_article_body} and {field_value_formatted_title}.

 

Forrest
# 4
Forrest

That made the difference. Thanks.