Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Gadgetto

  1. This (and selecting by id) seems to be the best answers for my question! Thank you @Zeka and all others for your help! I've heard before that the Processwire community is very helpful and friendly and I have to say that's absolutely true! I'm just trying to understand the basics of Processwire. Hence my seemingly pointless questions. I come from a different CMS (MODX) and it's a bit difficult to rethink at first. So I hope you'll also excuse my upcoming stupid questions... 🙂 @bernhard Hey, I'm also from Austria - only 60 km from Vienna, in Mattersburg.
  2. @elabx Thank you for your extensive answer! But my question was about how to get a specific page when there are multiple languages. The name field wont work as it has different content for each language. Seems I need to uses the id field in this case (which doesn’t seem to be the best way).
  3. Getting the page by it's id was my first thought, but is this the best way? The id field isn't even visible in PW, only in browsers URL...
  4. @Zeka Thank you for jumping in again! Let's say I'd like to output the title field and the summary field from the "sample-page" (DE name -> "beispiel-seite") on the "home" page (maybe in a sidebar). How would I reference the content of these fields?
  5. What is the best way to select a page in a multi-language environment? Explanation: The site I'm working on has 2 languages - EN, DE I have a page with EN name "sample-page" and DE name "beispiel-seite". How can I select this page language-independent via $page variable? Thanks for your help! Martin
  6. @Zeka thanks for the hint, I’ll try this. But the code from my post comes from _main.php template preinstalled with PW and I thought it should work. Hmm...
  7. Hello there, I'm very new to Processwire CMS and here is my first question: I've added a custom field to the language system template called languagecode (holds the ISO language code for each language). How can I access this custom field? I tried this for the $languages array: foreach ($languages as $language) { ... $hreflang = $page->getLanguageValue($language, 'languagecode'); ... } but return values are empty. BTW, this works as expected: <html lang="<?php echo $user->language->languagecode; ?>"> Thanks in advance for your help! Martin
  • Create New...