GetSimple Support Forum
get_i18n_component problem - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: get_i18n_component problem (/showthread.php?tid=4878)



get_i18n_component problem - itsmeee - 2013-06-25

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


RE: get_i18n_component problem - Carlos - 2013-06-25

Could it be you are using it like echo get_i18n_component(...) instead of get_i18n_component(...)? (without echo)


RE: get_i18n_component problem - mvlcek - 2013-06-25

(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)


RE: get_i18n_component problem - itsmeee - 2013-06-25

You are right. Thanks would have searched long to solve this problem.
Thanks for your help.