Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. Just an note: It's adding the script AFTER the </body>
  2. RT @henningheyne: Awesome how many agencies in Germany switched to #processwire as CMS or Framework. Today I talked with one who knows some…

  3. But that's not creating a new page, but changing an already created page. As I remember it was always like this.
  4. I can't reproduce this. When not allowjng to create new page with the template, I can't select it (means it's not there) when adding a new page.
  5. Ah, it's hard/confusing to understand that documentation, even for me. As you can see from my previous post: value would be = title and key = id. So I get now that a custom "value" could be set using "id=value|title", I didn't understand that at first. So setting it that way, it still works fine for me. $anredeField = $fields->options_anrede; $opts = $anredeField->type->getOptions($anredeField); $id = $opts->get("value=m")->id; $page->options_anrede = $id; ... The options config: 1=f|Frau 2=m|Herr So again it's just assign the ID to the $page->youroptionsfield and save.
  6. I'm not sure how that's relevant as he wants to know how to save the selected option, anyway... $options->get("value=myValue")->id; doesn't return a the key for me but $options->get("title=myValue")->id; does Edit: or $options->get("value|title=myValue")->id; so it's a bug?
  7. kixie, he's not looking to modify the field options but to save an options selected in his form. It should be simply adding the key (id) to your field: $page->form_type = 1; or using the value (title) $page->form_type = "Yes"; or if it's a multiple options you set an array using id's: $page->form_type = array(1,2); or titles $page->form_type = array("Yes","No");
  8. If you look at the hooking method and you see the arguments it is always clearer. If theres a $page you need to use arguments. But in cases if you hook the class Page you get the page with $event->object.
  9. Yeah it's one of the few things I remember without thinking.
  10. Or better named $pagefile = $event->arguments("pagefile"); $id = $event->arguments("id"); $n = $event->arguments("n");
  11. I'm not sure I understand it correctly. But what if you set 'max_levels' => 3, 'collapsed' => true, collapsed means it only shows the current branches.
  12. Sorry Bernhard haven't noticed your earlier posts. I experienced something like that with the backend admin url, but not sure anymore what it was. I have a project where I use it but that is a even a newer version than the current. So I might have it already fixed there. The other is something I see a problem with current implementation using strpos() on those domains. "site1.dev" is found in "sub1.site1.dev" thats why you have a problem. I'm not sure about a fix yet. I haven't got a testinstall I can play with currently, but will look into it soon. Thx.
  13. It's almost impossible to do updates to a high frequent live site without downtime. At least not with common setup php mysql. We have a project that has always user on the site browsing, ordering, commenting etc. Every time I even just upload a global template or script/module, there happen to be at least 4-5 errors in that 0,5 sec uploading it. I've been thinking a lot about how to fix that but it's simply not possible. Best is still, even for very small updates, to shut the site for maintenance to make sure there's nothing fancy happening.
  14. The page table pages are referenced in the field. So how about using this? Unless I'm not getting it what you're after. $pagetablechildren = $pages->get("template=xyz, pagetablefield=$page")->pagetablefield;
  15. What does bring you to that conclusion? PW maybe has the best ML support out of the box compared to other CMS systems.
  16. If you have no template file you won't see a "view" button. Rendering a page without a template results in 404. You need it.
  17. Everything looks as it should be. After all you remove first image from $images.
  18. I wanted to note that all those nice "page" features and custom php code and workarounds don't work when you use them with PageTable pages using different parent (some only if you save the the page and reopen it). https://github.com/ryancramerdesign/ProcessWire/issues/699
  19. The selector also returns a PageArray and not an Page, important detail.
  20. What functionality? There's been so many changes during dev I can't keep track of them. Well it seems then if you specify only a Page (parent) and not a PageArray via custom PHP code, it works as it takes that as a parent. It's the same as if you use the custom selector: "parent=page". Edit: Just tested and it works with "parent=page.id" selector but only with Select input and not PageListSelect (as stated) but also not for AutoComplete . Still way to go.. Edit: amazed that such an important and most often used fieldtype is still so quirky.
  21. Ah didn't knew this new description (but there were some changes regarding this fieldtype), but it remains that it doesn't work with AutoComplete or PageListSelect input.
  22. It says custom PHP code to find pages to select from and not a parent. So $page->rootParent doesn't work with custom php code to begin with. It has to return a PageArray.
×
×
  • Create New...