Developer
Supported
Category Info
Back to this add-on's main page
View Other Add-ons From Laisvunas
The value of the parameter “category_id” of exp:cat_info tag must be a number!
Support Request
|
Paradise
|
| Posted: 13 May 2011 12:09 PM |
|
|
|
|
Hi,
i need help. It does not work here:
{if segment_1=="produkte" AND segment_2==""} {embed="global_embeds/.html_head" default_title="Produkte - {site_name}"} <!--[if IE 7 ]> <body id="produkte" class="ie7> <![endif]--> <!--[if IE 8 ]> <body id="produkte" class="ie8> <![endif]--> <!--[if IE 9 ]> <body id="produkte" class="ie9> <![endif]--> <!--[if (gt IE 9)|!(IE)]><!--> <body id="produkte"> <!--<![endif]--> {embed="global_embeds/.global_header"}
some code
{if:elseif segment_1=="produkte" AND segment_2!=""} {if segment_2_category_id} {embed="global_embeds/.html_head" default_title="{segment_2_category_name} - {site_name}"} <!--[if IE 7 ]> <body id="produkte" class="ie7> <![endif]--> <!--[if IE 8 ]> <body id="produkte" class="ie8> <![endif]--> <!--[if IE 9 ]> <body id="produkte" class="ie9> <![endif]--> <!--[if (gt IE 9)|!(IE)]><!--> <body id="produkte"> <!--<![endif]--> {embed="global_embeds/.global_header"}
some code
{exp:cat_info category_id="{segment_2}" invalid_input="alert"}{cat_info_cat_meta}{/exp:cat_info}
{if:else} {embed="global_embeds/.html_head" title_postfix=" - {site_name}"} <!--[if IE 7 ]> <body id="produkt" class="ie7> <![endif]--> <!--[if IE 8 ]> <body id="produkt" class="ie8> <![endif]--> <!--[if IE 9 ]> <body id="produkt" class="ie9> <![endif]--> <!--[if (gt IE 9)|!(IE)]><!--> <body id="produkt"> <!--<![endif]--> {embed="global_embeds/.global_header"}
some code
{/if} {/if}
I get “The value of the parameter “category_id” of exp:cat_info tag must be a number!”.
But the funny ting is that i also get it if i’m on:
mydomain.de/produkte
I’m using the latest EE2.
|
|
|
|
|
Laisvunas
|
| Posted: 13 May 2011 12:27 PM |
# 1
|
|
|
Developer
|
Hi,
Parameter category_id is required and it must be a category’s ID number. So, in case the variable {segment_2} does not output a number you get an alert because you set parameter
invalid_input="alert"
If you plan that variable {segment_2} will sometimes output an empty string, set parameter
invalid_input="silence"
|
|
|
|
|
Paradise
|
| Posted: 13 May 2011 01:11 PM |
# 2
|
|
|
|
yes i set invalid_input=“alert”
to see whats wrong
But i don’t understand why
{exp:cat_info category_id="{segment_2_category_id}" invalid_input="alert"}{cat_info_cat_meta}{/exp:cat_info}
is executed in the place i put it.
|
|
|
|
|
Laisvunas
|
| Posted: 13 May 2011 03:09 PM |
# 3
|
|
|
Developer
|
Hi,
It is because for some reasons in ExpressionEngine complex conditionals are parsed very late.
Change your conditionals into simple ones or use Switchee instead of EE conditionals and that part of code will not be executed.
|
|
|
|