Jump to content

Friedrich

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Friedrich

  1. Sorry, forgot to mention it. It is PHP 5.5.9. Oh, you had the same error in version 3. Then it seems to be not fixed yet (if this is actually a bug).
  2. Hello, I noticed today some strange behaviour in connection with the multi-language plugin. I wanted to create a multi-language page and to display the languages in the frontend. To make it more fancy I wanted to add a flag icon to every language. So I used an image field I already had (image_small) and added it to the language-template. So far so good. Then I uploaded two icons and tried to fetch them in the frontend. I have the languages default (English/Englisch) and de (German/Deutsch) and the following code: <?php echo 'active|'.$user->language->image_small->url; foreach($languages as $language) { echo $language->title.'|'.$language->image_small->url; } ?> Result on an english page: active |/site/assets/files/1021/united-states.png English |/site/assets/files/1021/united-states.png Deutsch|/site/assets/files/1081/ Result on a german page: active|/site/assets/files/1081/ English|/site/assets/files/1021/ Deutsch|/site/assets/files/1081/ Somehow he can't get the German flag image at all and only the English page the English flag. But if I'm fetching the images from the $languages variable, it works. So I use this temporary as a workaround: <?php echo 'active|'.$languages->get($user->language->name)->image_small->url; foreach($languages as $language) { echo $language->title.'|'.$languages->get($language->name)->image_small->url; } ?> Result English: active|/site/assets/files/1021/united-states.png English|/site/assets/files/1021/united-states.png Deutsch|/site/assets/files/1081/german.png Result German: active|/site/assets/files/1081/german.png English|/site/assets/files/1021/united-states.png Deutsch|/site/assets/files/1081/german.png Everything is fine with this workaround. But why isn't working with the first code? Thanks for any help. Environment: PHP 5 ProcessWire 2.7.2
  3. Okay, thanks, now I will consider this.
  4. Oh... so simple? Haha, it worked. Thank you!!! Do I always have to add this on every find() where I don't want to use the pagination?
  5. Hello everybody. I have a question to the paginator module. I think this is a often used module so I posted it in the "General Support". On my page is a image-gallery with a lot of galleries. So I use the paginator there. It works also very well. But then I have a "Last Changes"-section further down in the footer. If I go to page 2 in the image gallery, the entries of the "last changed" section always changes. How can I avoid this? How can I limit the paginator to one query? $galleries = $page->children("sort=-created,limit=6"); ... galleries->renderPager() Only this query should be affected. But it also has effect on this query: $lastGalleries = $pages->find("template=gallery,sort=-created,limit=10");
  6. Oh, I am blind. There is already a topic for what I want to do: https://processwire.com/talk/topic/3913-add-page-only-to-one-language/ Thank you anyway diogo You helped me a lot.
  7. Okay thanks, this helps me a lot. And how can I create a page with just one laguage filled? When I create a page and I fill the title & url fields only for the main language, it is valid. But if I do the same and fill the fields only for the second language I get an error message because the title field and the url field in the default language is required. How can I avoid this?
  8. Hello everybody! I started using Proccesswire and I am really surprised how developer-friendly and easy-to-use a CMS/CMF can be at the same time. Really nice!!! But I encountered my first problem. I develop a multilanguage website and there should be a page for news articles which are not translated. Every language should have their own news-articles. Is it possible to have an "active" checkbox for the default language? How do you manage pages which should be only available to the not-default language? Thanks for you help. PS: Forgive me my bad english and "HALLO" to all germans here
×
×
  • Create New...