Posts: 14
Threads: 7
Joined: Mar 2013
Hi guys,
i use the i18n Plugin an it works like charm. Thanx for that. The only thin i am missing is the possibility to use html tags in the menu.
p.ex
My <strong>menu</strong>
or
<img src="img"> My Menu
Is there a possibility to implement this. HTML Tags work with the standard menu but not i18n, but I need multiple languages on my page.
Thanks for your answers.
cheers Gernot
Posts: 1,204
Threads: 30
Joined: Jun 2010
http://mvlcek.bplaced.net/get-simple/multi-level-navigation/navigation-rendering
Addons: blue business theme, Online Visitors, Notepad
Posts: 14
Threads: 7
Joined: Mar 2013
So I have to put the whole menu into my template and change it all manually. Is this correct?
Posts: 1,928
Threads: 88
Joined: Apr 2010
2013-06-13, 20:18:11
(This post was last modified: 2013-06-13, 20:22:20 by Oleg06.)
you do not need to lay all your menu in the template, you are invited to change the look of your menu in the component
Yes, that's correct
Posts: 2,094
Threads: 54
Joined: Jan 2011
(2013-06-13, 20:02:18)itsmeee Wrote: So I have to put the whole menu into my template and change it all manually. Is this correct?
If you enter the HTML tags into each page's menu text, you just create a component (without the htmlspecialchars in the example), e.g. named
menuitem:
Code:
<li class="<?php echo $item->classes; ?>">
<a href="<?php echo htmlspecialchars($item->link); ?>">
<?php echo $item->text; ?>
</a>
<?php if ($item->isOpen) { ?>
<ul><?php $item->outputChildren(); ?></ul>
<?php } ?>
</li>
and then call the navigation in your template with
Code:
get_i18n_navigation(return_page_slug(), 0, 9, I18N_SHOW_NORMAL, 'menuitem');
Posts: 14
Threads: 7
Joined: Mar 2013
Sounds complicated. I'll have to try it out. Thanks guys.
The other question which comes to my mind: If I use a german and an english menu. Is it possible to set part of the menu to invisible for just one language?
pEX
German Menu
Startseite | Übermich | Kontakt
English Menu
Home | Contact
So no "About me" site in english. In my case it always shows the german "about me" site at the english version, as long as there isn`t defined another version in english.
Posts: 2,094
Threads: 54
Joined: Jan 2011
(2013-06-13, 21:45:31)itsmeee Wrote: Sounds complicated. I'll have to try it out. Thanks guys.
The other question which comes to my mind: If I use a german and an english menu. Is it possible to set part of the menu to invisible for just one language?
pEX
German Menu
Startseite | Übermich | Kontakt
English Menu
Home | Contact
So no "About me" site in english. In my case it always shows the german "about me" site at the english version, as long as there isn`t defined another version in english.
In your default language all pages should exist, otherwise you will get undefined results. To show only those pages that exist in a non-default language, use
I18N_SHOW_LANGUAGE as 4th parameter to
get_i18n_navigation - see
here.