Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender
  • Location

thomasklaiber's Achievements


Newbie (2/6)



  1. Found the solution myself, I can't just set the second parameter of pageName to true, I have to set it "Sanitizer::translate". Correct code that works: $page->name = $this->sanitizer->pageName($page->title, Sanitizer::translate)."-".date("d-m-Y", $page->getUnformatted(date));
  2. Well I got another problem over here. The example code works perfectly like I wanted it. $page->name = $this->sanitizer->pageName($page->title, true)."-".date("d-m-Y", $page->getUnformatted(date)); But the sanitizer doesnt work as exspected. It doesnt convert special characters (like ä ö ü) right in this case. For normal pages it works correctly (I added them to the character replacement list) ... do I have to change something if I use the function in a module?
  3. Hi kongondo, a download has the template "download" and a category currenty has the default-template (basic-page) but could be changed. In the download-template I set a field called "download_category" where I can select a single Page (the category). And a Category could have multiple downloads. And yes, the output should be something like a nested <ul> list .. like the Pagetree in the Backend of PW. My first try was this: $kategorien = $pages->find("parent=/kundenbereich/downloads/kategorien/"); foreach ($kategorien as $kategorie) { $downloads = $pages->find("template=download, sort=-date, sort=download_kategorie, download_kategorie=".$kategorie->name.", kundengruppe=".$user->kundengruppe); foreach ($downloads as $download) { ... But it doenst work well with the nested categories.
  4. I know there are a lot of category-topics on this forum already, but I can't find a solution for my problem. I got the following page-tree: Downloads - Download 1 - Download 2 - Categories -- Category 1 -- Category 2 --- Subcategory 1 ---- Deeper Subcategory -- Category 3 So categories can be really deep. Each download is assigned to one category only. And I would like to output it in my template like this: Category 1 - Download 1 Category 2 - Subcategory 1 -- Deeper Subcategory --- Download 2 But I can't find a good selection to do so.
  5. Looks exactly like what I was searching for - I'll try it Thanks a lot!
  6. Hello, I'm new to processwire and currently working on my first (real) site. Now I'm searching for a good soluton for an event calendar (just a date-based event list). For now I've created everything (pages, templates, fields) well and it works theoretically. BUT In this case every Event is called "Training" but with different content and different dates. Now Processwire prevents dublicate entries in the backend with an error - what is okay because not every event can have the path "/events/training/". My first solution would be addingt the date to the name like /events/training-2013-06-23/ .. BUT I would always have to change this manually, when the date of an event is changed AND this wouldn't be automatic. So I need a really simple solution for this problem .. is it possible to add the date to the name automatically when the page is saved? Something like this would be great.
  • Create New...