Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i18n Navigation with HTML Tags
#1
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
Reply
#2
http://mvlcek.bplaced.net/get-simple/mul...-rendering
Addons: blue business theme, Online Visitors, Notepad
Reply
#3
So I have to put the whole menu into my template and change it all manually. Is this correct?
Reply
#4
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 Smile
Reply
#5
(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');
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#6
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.
Reply
#7
(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.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply




Users browsing this thread: 1 Guest(s)