Jump to content

Hanna Code + Multilanguage


kater
 Share

Recommended Posts

Hi,

Sorry, total noob alert.

I have a couple php "Hanna Codes" which work just fine in the hanna code save&test area and directly executed from the template (both en/ger).

However, when run though hanna code it stops the loop after the first title (also language independent).

Without Hanna, everything works just fine.

forgot to add: code stopped working after installing / setting up multilanguage support. before it was fine.

Anything I'm missing here?

Thank you!

<?php
  $articles = $pages->find("parent=/events/ok");
    foreach($articles as $s)
         echo "<li><a href='{$s->url}'>{$s->title}</a>, {$s->event_beginn} : {$s->event_ende}</li>"; 
	   ?>
Link to comment
Share on other sites

I don't understand completely.

So your Hanna code does not work when executed through the text formatter but everywhere else? What's that code snippet you posted? Is that what you entered in the Hanna code php field? What's that php closing tag doing there? That might break the whole thing.

AFAIK you don't enter opening and closing tags in the Hanna code input fields.

I am guessing right, that you are patching together a loop with the opening of the loop and the closing of the loop in two different Hanna codes?

Link to comment
Share on other sites

Hi owzim,

thanks for your reply.

Maybe i should add, i installed multilanguage support after setting up the site & using hanna codes.

So your Hanna code does not work when executed through the text formatter but everywhere else? What's that code snippet you posted? Is that what you entered in the Hanna code php field? What's that php closing tag doing there? That might break the whole thing.

Yes, exactly. The pasted code works everywhere but through Hanna text formatter after i installed multilanguage support. Multilanguage itself seems to work properly.

I removed the closing tag but with no difference.

AFAIK you don't enter opening and closing tags in the Hanna code input fields.

Yes, thats right. Unfortunately, i guess my problem lies somewhere else since it seems to strip/add them anyway. Also, it did work before multilanguage.

I am guessing right, that you are patching together a loop with the opening of the loop and the closing of the loop in two different Hanna codes?

Just a simple loop here.

***

I just figured out, the (body/textarealanguage) field seems to strip all html entities. No matter which formatters are applied and if content type: Markup/HTML is selected. Same with tinyMCE or Textarea Editor. Strip tags is disabled.

****

another detail:

the code (used with hanna) works with any other field like name instead of title (PageTitleLanguage works fine in any other usage on the site).

echo "<li><a href='{$s->url}'>{$s->name}</a>, {$s->event_beginn} : {$s->event_ende}</li>";
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...