Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. I was using this since a long time. I also noticed that ListerPro doesn't use that concated title for the first result. Strange.
  2. A module is either designed for backend only. Then you know outputformatting is off always. Or for front-end, then it's always on. If you do stuff in your module that requires outputformatting off or on, just make sure and set it according to. If you're not sure, you should remain state with: $stateBefore = $page->of(); $page->of(false); ... $page->of($stateBefore);
  3. I'm not sure I understand. It doesn't work like this. The name on the domain page remains the same for each language. Otherwise it doesn't match what you entered in the module settings. Language through language segment is set on root "/" page name. It then becomes domain.com/en/ or whatever you set it.
  4. You cant be sure if a module is used in frontend context or backend. So turning on on or off by default isn't going to work. But then I don't know what's so difficult about it.
  5. While it would be possible to inject in memory pages, I don't want to go that route for various reasons. What I do is add a dummy page as you mention. Then add a field "exturl" to the template. Then enter the url in that field like "/path/to/file.php". In the navigation code you then use "exturl" in the item_tpl: $options = array("item_tpl" => "<a href='{exturl|url}>{title}</a>');
  6. RT @processwire: New post: ProcessWire 2.6.23 (2.7 rc2) w/fixes, PRs & upgraded lang tools + looking at a more open core license– https://t…

  7. I experienced some wierd issues with saveReady before and after and am still waiting for the mystery to be solved Mentioned it somewhere but can't remember where. Also happened to have corrupt status in db. I think I reported those but couldnt tell why it happened, neither Ryan. On mobile so too lazy to look it up.
  8. I was about to change it on cheatsheet. But now it's because it's only a set and default is ON. Hence there's two entries in cheatsheet and not (true|false). So a $parent->setTrackChanges(false); ... $parent->setTrackChanges(); would be sufficient.
  9. Ehrm I'm not sure it's really correct code. Just trying to get my head around it. $page->setTrackChanges(false) isn't correct but it may have an effect to clear out changes? Sorry for the confusion. Lol I'm so stupid, looking at the wrong method in Wire.php, no it's ok I guess. Sorry again.
  10. I would suggest it to Ryan see what he thinks. Sorry, no this is core and not BCE.
  11. Just tried a $parent->setTrackChanges(false); $parent->addStatus(Page::statusUnpublished); $parentEditable = $parent->editable(); $parent->removeStatus(Page::statusUnpublished); $parent->setTrackChanges(true); and it wouldn't track it. I think it's something we want to hide from the track change system. What if I'm listening to page changes in my module? Edit1: I noticed recently that there's really a lot of such changes going on in PW. Only opening a page editor does change the created_users_id for example. Huh? Edit2: well I guess it's because I'm tracking every change to page object, so I guess there's maybe some way around it (using page type, template etc, and fields). But still I think such back and forth changing to archive something, those should be hidden from track changing. What you think?
  12. Why is this needed to change Status and back I don't get it? I don't think it's nice if it's tracked. What if I track changes to my pages? So maybe a trackChange(false) is needed?
  13. Not sure what's about that, but I tried this module and now I get on every page save I see message "Session: Change: status". Took me a while to realize it's BatchChildEditor.
  14. Huh? Why do you Bootstrap PW, when you're already in PW?
  15. Since your ProcessModule is in /processwire/... It's not possible to have guest (no guest is not logged in) user access to it.
  16. Wanted to ask the same. Only way I see is use a page with a text field to enter a path to a php file. Then use that field as in the url tag in the item template. I.e. href='{pathphp|url}'
  17. Well InputfieldSelect already has support for optgroups. If the label is an array.
  18. No idea, no it shouldn't. Then in the editor it would also have a wrong url in the file field.
  19. All is in the cheatsheet and website docu is years old but still actual and valid (we are working on it continually). (I can update a 2.3 install to latest and it still works).The API doesn't change and there's a version number on each entry and if it's deprecated it will show as such. It's only that some of newer API (only few) are not yet in the cheatsheet, like many other hidden API that's not meant for the cheatsheet officially.
  20. This would be the urls to the folder not the image itself, it's because you were outputing the $page->field->url and not the image because it was an array.
  21. I've created the cheatsheet and there's a extended view of it. The idea is, that there would be more extended description and examples along with deprecated, introduced version etc. It's a work in progress and it's slowly going forward. This was built already 2 years ago. I just fixed a bug that wouldn't show it to the public and many API entries are not yet worked on. Cheatsheet and Extended docu is built on PW! We are a small team that has access to the cheatsheet PW backend. But practically anything would be possible to make this even more a place where dedicated people would be able to contribute. We're just not yet sure how. A good example would be http://cheatsheet.processwire.com/files/image-properties-in-addition-to-those-in-file/image-width/
  22. What url does it output? It may your file field is multiple, then AnimalSound would be an WireArray.
  23. The load and setup hooks you could put in _init.php but the render would be where you render your navigation.
  24. You're missing the /site/templates/home.php You only modify the url the echo $yourpost->url would output thus leading you to the modifed url off root. But the system or the root doesn't know about that, it looks for a /pagename/ but it doesn't exists so you have to implement it and capture the urlSegments etc. This is common thinking that a hook will change PW's routing but it doesn't. It just modifies output of the page's url.
  25. https://processwire.com/talk/topic/11069-sorting-images-in-backend/?fromsearch=1
×
×
  • Create New...