GetSimple Support Forum

Full Version: get_i18n_component problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,

if I use multi language components and i put get_i18n_component in my template, i get the correct output but afterwards theres alwas a 1 on my page.

Safari says the 1 is a Nodelist with data 1. This is with all of my components.

If i use the standard get_component... the problems not there. Any idea?

thanks
Could it be you are using it like echo get_i18n_component(...) instead of get_i18n_component(...)? (without echo)
(2013-06-25, 19:16:01)Carlos Wrote: [ -> ]Could it be you are using it like echo get_i18n_component(...) instead of get_i18n_component(...)? (without echo)

get_i18n_component (in contrast to get_component) returns true/1, if the component exists. This allows you to use code like the following:
Code:
get_i18n_component('sidebar-'.return_page_slug()) || get_i18n_component('sidebar-default')
(display the page specific side bar, or - if it does not exist - the default side bar)
You are right. Thanks would have searched long to solve this problem.
Thanks for your help.