Jump to content

Oliver

Members
  • Posts

    167
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Oliver

  1. As I create the template as a clone of the home template on installation of the module, couldn’t I set the noMove using the templates attr() method? At least I’ve set the parentTemplates to only accept the root page’s template.
  2. BTW: I saw some code parts checking on a NoMove property of templates to keep them being moved within the page tree. But I didn’t find a way to actually create a not movable template. Would be perfect to lock the language trees’ position in the hierarchy. Any idea?
  3. Soma, so we are kind of neighbours. I’m living and working in Basel. Can anyone give me a hint regarding the process hooks? How do I access the created/deleted/trashed page’s id (or page object) in my method dealing with the passed event object?
  4. Thanks Ryan, you are the best! I updated the core files with your changes and implemented the cloning. Works fine so far. Some important steps to make for me, yet: Setting up hooks dealing with manually created pages in language trees, deleting pages from language trees, moving pages in, out of or into trash from language trees to keep the pagemap consistent. The pagemap associates all the different language version of a page with each other. Creating new translation from the "Languages" tab of the page edit dialog. Offering "by cloning current page" and "by creating new empty page". Maybe there also has to be the possibility to map the currently edited page manually with an existing one? Providing an var $languages to make a list of all languages (for language links), the current page’s translations in the different languages as well as the current active language accessible in templates. As soon as I got the languages tab processing part done, I’ll post a download link here for you guys to have a look. Would love to get some feedback on this.
  5. Thanks a lot for the example, Ryan. Works pretty fine. Got the language tab working and just have to finalize the listing of the associated versions and the processing of the form/mapping in the database. Will look into that tomorrow evening. If we get the cloning done, maybe I can provide a test version of the module to the end of the week.
  6. Recursive cloning as an option would be great! If you post me the example code for extending the page edit form, I could work on the language versions interface while you are working on your "clone" update. And to answer your question: Yes, I’m using 2.1.
  7. Thanks for the input, Ryan. I already experimented with cloning a page and at least got a page transfer from one language tree to another. I guess I’ve to go through the fields one by one and create a copy by setting an new field of the same type and duplicating the data/values/files associated with it. Do I also have to clone any db data–if there is–of role or permission objects related to the page? As soon as the cloning process works, I would focus on the implementation of the language management in the page edit form. So I let you know when I got there!
  8. The cloning won’t happen automatically. If it works out the way I want it to, you’ll be able to mark the languages in the page edit languages tab you want a clone to be created for. Maybe there should be an option to mirror the default language’s page structure completely on creation of an additional language, too? --- Jbroussia, just found your post: http://processwire.com/talk/index.php/topic,391.0.html Funny, you were thinking of the same approach just two weeks before me! --- As you guys already talked about in the other thread, cloning pages isn’t that easy. I decided to deal with cloning a languages page tree completely on creation of a new language–as long as I have no idea how to manipulate the page edit admin page. But because of the complexity of the page-fields-structure, I’ve no idea of all the things that have to be duplicated with and for each page to get a kind of clone–in view of fields, values, roles etc. Would be great to get a hint here, too. [Edited by Adam] Glued three of your posts together. If you want to enhance/edit your message (add another idea(s), etc.), please use 'Edit' function, instead of double (triple, ...) posting. Thank you!
  9. Don’t use with PW2.2 because of potential conflicts with its built-in multi-language support. Module will be replaced by a «context» manager module allowing you to define language specific page trees (among other possibilities) based upon PW2.2’s own language management. Download Module ProcessLanguages, Version 0.08, more alpha than beta, from GitHub: https://github.com/L...rocessLanguages # 2011-11-19 0.08. Language specific error404 pages implemented. # 2011-11-10 Test version with basic features (0.07). Added template variable to enable switching between translations. # 2011-11-10 Test version with basic features (0.05). Uninstall still gets kind of manual. Mapping doesn’t work properly, when pages from outside are moved into a language’s page tree. And that’s how it all started: Hey, I’m working on an module to implement multiple language support in ProcessWire. Until now the module provides an admin panel to set up additional languages. Every language is represented in the site’s page hierarchy by an own home page automatically generated as a child of the site’s root. The language’s home page id is associated with the language entry in the admin panel. If the site’s root is called, a hooked function automatically redirects to the home page of the language defined as default. The module is inspired by the concept of modx module Babel by Jacob Class. The next steps on my list are: Setting up a db table associating the different language versions of a page with each other. (If possible: ) Adding an additional tab to the Page Edit top menu (Content, Children, etc.) providing an overview of the other language versions of the edited page… Question: Is there a possibility to hook into an event allowing me to change the page edit top menu and add a "language" tab to the edit form? Any idea? … and allowing to create language clones of a page by copying it to other languages’ page structure. Would be great if there were some hints or suggestions to make it work and maybe more useful in the end! Thanks in advance.
  10. Hey ryan, I did the update and checked everything. Seems to work fine now. Thanks for your help. No idea what was the problem in the end.
  11. Thanks for your fast response. I tried to use the render()-method. The result was a blank screen. Even with a pure html template without any php syntax in it the result stays the same. Any idea?
  12. Hey ryan, found the time finally to try out PW and I really like it. But now I’ve to get more familiar with the possibilities through playing around with some code. So, my question in the context of this thread is how I can output the complete rendered code of a page. I got a list of page objects returned by a ->find(); call and as I loop through it, I want every single page’s html output (as defined in each page’s template) to be echoed. I saw the ->render() method in your post above but wasn’t able to find any documentation on how to use it or whether it has anything to do with the soultion of my problem. Thanks in advance for your help.
×
×
  • Create New...