2011-05-17, 04:47:59
mvlcek Wrote:Or you can do it like this (example for additional language German):
- Install the I18N CustomFields plugin
- Create your sidebar components, e.g. "sidebar1", "sidebar1_de", "sidebar2", "sidebar2_de", ...
- Goto Plugins/Configure I18N Custom Fields and add a field named "sbcomp", text "Sidebar", type "dropdown" and enter an empty line and all possible sidebars below the type, e.g.
Code:sidebar1
sidebar2
- Edit each page which should have a custom sidebar component and select the corresponding component from the list, then save.
- Include the following code in your template:
Code:<?php get_i18n_component(return_custom_field('sbcomp') ? return_custom_field('sbcomp') : 'sidebar'); ?>
Thanks a lot! This was excactly what I was looking for.
Sorry, Zegnåt, didn't mean to hijack your thread!