Jump to content

Recommended Posts

Posted

Hello,

I'm trying to build a very simple Translator Plugin and somehow managed to get what I want on a "simple" page, meaning one that's straight from the admin. Now I'm trying to build the same functionality into my overview pages.

The idea is to put the language into the session and then use $page->body or $page->body_en (and a few other fields) accordingly.

Is there a way I can hook into $pages->find, iterate over the array, swap the content of the containing pages and return the array? For style and comfort I'd like to do this in a module, so a hook is needed.

I tried addHookAfter('Pages::find,'','') but could make no sense out of it.

I hope my explanation makes sense.

Thanks for any hints,

thomas

Posted

Do you mean you've got this figured out? Let me know if I can post an example of hooking before/after Pages::find?

  • 3 weeks later...

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
  • Recently Browsing   0 members

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