Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. You can, but it's really not much work to create the page on your own and not rely on any other party module.
  2. You need at least some way to identify which list item was clicked and you've only the get or post data option in this case. There's no way around that. As soon as you know that you can just create the page via the api and redirect to the page edit screen for the id of the new page.
  3. Or a hidden form on the page, that does get submitted to the target page with some post data. But that would make the data accessable/editable to users.
  4. @tpr If so I'd post even before the starting post, which is not the case. q.e.d.
  5. That .css.map thing is an issue, that I remember being fixed, but which certainly has nothing to do with that image issue.
  6. That's also my point of view. One can simply install things with homebrew, where you'd need to fiddle around for days on windows. But it's crazy to see how hardware alone doesn't make any cut anymore. It's just software and workflow, which determines what's better for a person.
  7. You can't and that's for a reason. If you could elaborate on why you would need it we can give you alternatives.
  8. The form api of processwire isn't meant to be used in the frontend, therefore I doubt there being any updates like that. But you can add that functionality on your own. $wire->addHookBefore("Inputfield::render", function(HookEvent $event){ $inputfield = $event->object; $inputfield->attr("ng-model", $inputfield->name); });
  9. I know that trashed pages keep the prev. parent in their name, so it can be restored later, but is there a api way to get that value without restoring the page? E.g. still getting the (parent) event a reservation was part of, even if the reservation time elapsed.
  10. It's kind of that way, but a page is always joining data, as each field's data is in a separate table, no matter how you build your structure. But regarding the structure. This isn't the most optimal approach. According to the tutorial it would be much more flexible to have the categories as pages (mostly the title, maybe with an description) and the translations as pages, with catergory (page field), german and english (both text fields). This way you can easily update both types of entities independent of each other. I'm not sure about the scale of your project, but repeaters aren't as efficient as normal pages and lack e.g. options like the hidden/published states, which is to keep in mind as a project might grow. If you need a nice listing of categories you could use pagetables on the categories or lister/listerpro lists.
  11. A textformatter works on text, as the name suggests, and not on images. It should work like that: $img_markup_srcset = $modules->get("TextformatterSrcset")->formatValue(new Page(), new Field(), "<img src='…' />");
  12. @Gazley True the docs around it are shitty. @tpr Is it automatically expanding to 100% viewport height even with smaller content? That's what Foundation for example cannot do (at least in v4).
  13. FormBuilder is using ProcessWire's inputfield modules. At least those that work standalone without an accompanied fieldtype. If you can create your needed functionality like those you can use it in formbuilder.
  14. The only thing remotely in that realm would be the new IftRunner, but that does only handle the triggering and not the actual logic which should run. But maybe you can adapt the "button"-code I postet here to add an button to the "lang" template. The triggered logic could then download the newest lang pack and replace files in the page with the new ones. The fields with the language files are more or less standart file fields form the api, so this should be well covered by forum posts and docs.
  15. Off Canvas in Foundation is not really half-assed, but rather a mediocre compromise. I've yet to find any off canvas solution which works well in every situation (without js).
  16. Maybe a long shot, but are those pages multi language?
  17. This is certainly not how it's intended to work. Like Ivan I'd suggest posting that on github, too. @Ivan Your version doesn't query the db more often. It's a single db query and two runtime queries. What could be a workaround is a subselector. $pages->find("template=accommodationtype, availability=[column=1194, row=1889, value=1]");
  18. Use a prependTemplate file, where you check for the language and if it's the "not public" one just throw an 404 or redirect. Can even be adapted so translators can visit the site.
  19. Almost always the answer to that question is: Write an importer script, where you read the backup data and insert them to processwire via the api. There are various topics here in the forum about importing and importers with more detailed description. If you've still questions afterwards feel free to ask them.
  20. Markup inside of meta tags? That sound strange. But a textarea is the best way if they are just copy pasting. It's not hiding anything and it will just save what's in it. But skip the strip markup setting in this case.
  21. Repeaters aren't a good idea if you're expecting even stars to not fit on the tree. Problem is, that each star will be loaded if you try to open the page containing the stars, which doesn't scale very well. I'd rather suggest using normal pages for stars and using a "tree selector" pagefield to link them to the tree page. To get an overview over all stars in the backend you can then use Lister/Lister Pro, which do scale.
  22. I may be misunderstanding, but why do you even use TinyMCE, which is by definition a tool to create html content. Seo fields do not support any html-tags, but only raw texts. Just use a simple textarea without any rich text gimmics, maybe add the strip tags settings and you're good to go. That's right.
  23. Ah now I see it. You cannot use functions inside of strings (wire() is a function, even though it's used as a variable). That's not correct. The PHP selector computation is (maybe the only) place, where only the $pages variable is available at local scope (see here). To use the other api variables it's best to use wire(…), but accessing via the class scope does work too. So both of these would work: return $pages->find("template=address, created_users_id={$this->user->id}"); return $pages->find("template=address, created_users_id=" . wire('user')->id);
  24. You probably want to differ by roles, which is just this: if($user->hasRole("editor")) … Edit: Should've read more closely. Does the selector work if you try it in the backed under Pages>Find? Are the pages hidden, unpublished or otherwise view access controlled?
×
×
  • Create New...