Jump to content

dotnetic

Members
  • Content Count

    772
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by dotnetic

  1. Thanks @horst for this tutorial, which is very good for new users. I also updated the link in the README of the german language pack: https://github.com/jmartsch/pw-lang-de/blob/master/README.md
  2. @awesomolocity I think I found out what you meant: You selected no filter for the module name or the category and then clicked "show all". That was a bug/missing feature, which is fixed now https://github.com/jmartsch/processwire-modules-manager2/archive/v2.0.103-beta.zip.
  3. Hi @awesomolocity. The XHR request is only being made once on loading the module, and not when changing what to show. If you select "Show all" make sure, that nothing is selected in the "Search for module" field. If a category is selected "Show all" means to show all modules in this category.
  4. You won't regret it!
  5. Till which step did you get? Is the setup completed? Did the error occur within the setup?
  6. Your are welcome. I don't think that this should be in the module repository, as it is for a very special case. And If users or search engines guess your preview variable, they are able to see/index your content, which is not yet to be meant to be read, hence the unpublished status.
  7. The first selectors would not return unpublished pages. You have to use $pages->find('your-selector, include=unpublished') or include=all instead. The $pages->get() method already includes hidden and unpublished results, as you are explictly requesting pages. Regarding your problem: You want to hook the ProcessPageView::pageNotFound method and modify the output. I made a little proof-of-work module for you. It is a combination of the hooks for pageNotFound and Page::viewable. Maybe there could be a better and easier solution. Install the attached module to test it out. previewOption.module.php
  8. If you iterate through the results of pages and use the page object in that iteration (for example if you want to get the value of a field), then the whole page would be loaded into memory, which is very slow if you have many pages. This could also lead to out of memory errors. I experienced this, before I found @bernhards solution RockFinder2 which is really great. There are some discussions about the performance here in the forums.
  9. There is not only the possibility to use ProcessWire in a subdirectory and for one page only. You can also use ProcessWire content in other pages, that are not being served by ProcessWire. This process is called bootstrapping and others here already wrote about this. You can find more information in "Including and bootstrapping ProcessWire"
  10. Did that. New README with updated instructions is live
  11. @bernhard Yes, I was just about to write about it 🙂 I have reconsidered my statement, reviewed the procedure, and revoke the statement that it is bad practive. In my project there were some problems with languages at that time, but I can no longer reproduce them. I see no problems with the procedure described by Horst.
  12. @horst's tutorial should be a sticky post in the forum.
  13. What you mean by connects with the internet? Do you require some external resources for example webfonts, a Js or other library from a CDN, etc. in your template?
  14. @gebeer @bernhard Here you go 🙂 https://github.com/jmartsch/pw-lang-de/releases/tag/3.0.148
  15. Hello @gebeer, yes, I still maintain it, but had little time in the past. The last version was for PW stable 3.0.128. Right now PW stable is at version 3.0.148. I try to have a look at it in the next days and update it, if applicable.
  16. As @horst already said, the paths to your images in your JavaScript file seem to be wrong. If you open Chrome Dev Tools Network Tab, then you see that a lot of 404 errors occur for the background images.
  17. If you could post a link to the online site, that would be helpful.
  18. There is also a config setting for the adminRootPageID, but I would not recommend to change it, as a config comment states: "Values in this section are not meant to be changed". And some modules even use this setting, to find a subpage, for example PageLister Pro, which then would not work as expected anymore: $admin = $this->wire('pages')->get($this->wire('config')->adminRootPageID); $parent = $admin->child('name=page, include=all');
  19. You can use a hook to redirect after "Save & Exit": // the hook in a location like _init.php or in a module's init function $this->addHookBefore('ProcessPageEdit::processSaveRedirect', $this, 'redirectAfterSave'); /** * redirects to the main ListerPro "Raumdatenblätter" after saving a page with template raum * @param HookEvent $event * @throws WireException * @throws WirePermissionException */ public function redirectAfterSave(HookEvent $event) { $url = $event->arguments(0); $page = $event->object->getPage(); if ($page->template == "raum" && !$page->isTrash()) { if ($url == "../") { $goto = wire("pages")->get('/raumdatenblatt/raumdatenblaetter/')->url; $event->arguments = array($goto); } } }
  20. I think Bernhard's ideas are very good and intuitive. I would also think that a ->has method would return a boolean.
  21. There was a problem with the modules directory. Now you can install the module from within ProcessWire. I am looking forward to your feedback.
×
×
  • Create New...