Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by DL7

  1. @teppo Thanks! I only cant find that thread. Via the module page, this board is linked. Could you let me know where to find the correct board? I did some investigation and found out that the AdminUIkit uses a different way (or at least code) to populate the breadcrumb. For that reason the standard way to remove them doesn't work. To be able to manipulate the output, I used a hook. $this->addHookAfter('AdminThemeUikit::renderBreadcrumbs', function(HookEvent $event) { // Get the object the event occurred on, if needed $AdminThemeUikit = $event->object; // Populate back return value, if you have modified it $event->return = $return; });
  2. So, somehow I got it fixed, by changing the Default Map Tile Provider in the field setting. Somehow the default OpenStreetMap.Mapnik doesnt work for me.
  3. Thanks! So this works for all pages except: /your-admin/page/add/ . Somehow this page is using a different "breadcrumb". Any ideas? @monchu @adrian
  4. So using the dev version, the geo coding is working. (also when you add a key to the google geo call). But I now run into an issue where the map is grey out in the "edit page" set-up. I cant fill in an address either as the input field is disabled. @hellomoto mentioned this issue before. Did you got a chance to fix it? @Mats ay pointers?
  5. I have the same issue. Installed it as per the guidelines, but it throwing me the same issue.
  6. Hi all, As I want to make full use of all the features build standard in the Admin, I'm currently creating a custom dashboard for user so they can add and edit pages. These user may only acces their own created pages and of course add new once using 1 restricted template. For this I use Admin Restrict Page Tree module. This is working as expected, page tree and page tab is not visible. But I found a bug which I cant seem to solve: As said the user has the ability to add a page. On this add page, the breadcrumbs are shown. If a user would click, it will open the page tree on /admin/page/list/. This should also be not visible, but it still is. I cant seem to restrict this page. Same goes also for the admin/page/add/ (showing all the parent page, while the user should only be to see the one page I offer him to edit.) - this one is more difficult and I could except if this was not possible. Any pointers would help!
  7. @BitPoet One additional error I see: when using embed methode c, the JS is not triggered, this posting the form when clicking on add row. I'm checking it currently but havent found the problem yet. Added this the init $this->addHookAfter('Page::render', $this, 'addScripts'); This as a function public function addScripts($event) { $page = $event->object; if($page->template == 'admin') return; $additionalHeadScripts = '<script type="text/javascript" src="'.wire('config')->urls->siteModules.'FormBuilderMultiplier/FormBuilderMultiplier.js"></script>'; $event->return = str_replace("</head>", $additionalHeadScripts.'</head>', $event->return); } And commented/removed the current JS append to get this fixed.
  8. Hi @BitPoet, Thanks! Some additonal pointer: on an older version (3.0.36) I dont see this fatal error, but the increment still isnt working. The below mentioned isnt working for me either on this older version. See the form initially starts with their "normal" ID/Name as been set in the settings This works only if I add if($child->name) $child->name .= "_1"; If I do this, then the increment is working perfectly. Problem I face then is that none of the entries fields are filled with values 🙂 I'm also looking into that. Fixed that by adding this same line to the populate hook: if($child->name) $child->name .= "_1";
  9. Hi @BitPoet, I have tried your module and ran into a few error: 1. The "multiplied" rows are not getting the _NUM suffic for name and ID. Only on the label its adding #2 2. And Fatal error is thrown when checking the entries. This is within the ToPopulate function. If I Escape this row the error is gone. (I'm on the latest dev PW version) //$hid->label = _("Number of rows"); 3. When I can view the data in entries -> the multiplier doestn have a value and the orginal has the filled in value of the original. Probably caused by 1.
  10. Hi @adrian, Thanks! That did the trick. Cheers
  11. Hi @Ferdi Derksen, Thanks. Tried it, and its still not working. I also checked the code and concluded that the somehow the addHookAfter is not triggered, when using the $page->save via the API. I work when using the backend save. Not sure if this is expected behaviour?
  12. Hi @Ferdi Derksen, I installed your module on our test location and it works like a charm. Just one additional question. Would it be possible to execute the same code when a page is created and saved via the (API) $page->save. I added $p->publish_to_twitter = 1; before the $page->save and removed the wire()->input->post->id, but when I open the page just created, the check box is checked, but the page is not (yet) tweeted. Only if I click on save manually again its tweeted. Any idea what I need to amend in the code to get this working? Cheers
  13. Questions on this module. I seem to have issues with dynamic parameters in the url. /test/test?utm=test is catching a 404 and not redirect although this is set-up in the redirect module like: /test/test -> /newtest/newtest
  14. And you are right. In that case I would definitely go for a different approach. The one you mention from ryan is indeed also doing the trick. One thing to mention though on this is that this code isnt taking into account a certain status of the page the Option values it's been used at. I have certain pages that are for instance unpublished, hidden or even have custom status, that i've created myself, those would also be taking into account whereas for the other code I can make that exception on the selector.
  15. Again thanks for your help @Zeka. I wasn't aware of the each() function, so that help alot! Just to be clear on the above reactions, with the country list example I just wanted to point out an example of a large dataset. I wasnt looking for a country list itself. But if I need it in the future, I'll have some great pointers on how to upload them ;-) Next to that if you are really stubborn person (like I am ;-) and still want to utilize the fieldtype options for this, use this code: $options = $fieldtypes->get('FieldtypeOptions')->getOptions('xyz'); $options->each(function($item) { $count = wire('pages')->count('template=basic, xyx='.$item.''); if($count) { echo "<li>{$item->title} ({$count})</li>"; } });
  16. Thanks for your help all, I'll give it a try.
  17. Hi @adrian , Thanks for this. Very helpful. But i`m still struggeling with the fact on how to get a list of the relevant items. As per my example above, how would I check first of all the distinct values used? In either approach (options field or page) I still need to "loop" through the $page->category correct? How from an API call can I make sure only distinct values are shown in the loop? Next to that the trick would also be to add a additional count. I would know how to do this from a SQL perspective, I`m just not sure on how to do this using an API call. Note: a single page will only have 1 value as a set optionvalue (so no multiple values possible on a single page) Thanks again!
  18. Hi @Zeka, Thanks for your swift reply. As I understand ir correctly I would need to create then a page for each individual value. That would work for instance for 10 values, but lets assume the options are countries, is would be a lot of work to add every single country as page. Explaining it a bit more: What I`m trying to recreate is sort of a very small version of a so called facatted search functionality like on the sidebar on this page: https://www.laptopshop.nl/category/45702/laptops.html
  19. Hi, I have multiple Options fields on a certain page. On an overview page I like to add a filter, which display`s all the distinct value`s of the optionfield, but only the once that are in use. As an addition I would like to have the amount of times this specific value is in use. So: Given the following: 1=ABC 2=DEF 3=FOO 4=BAR I have for examples 5 pages were Page 1 uses 1 Page 2 uses 1 Page 3 uses 2 Page 4 uses 4 Page 5 uses 4 So on the overviewpage I like to have an overview with (note the 3=FOO is not displayed): Options: ABC (1) DEF (1) BAR (2) I know in the API there is a possibility to use $all_options = $field->type->getOptions($field); But I would need the $all_inuse_options ;-) Next to that It would be a nice to have to add the count.
  20. Hi All, Hi @teppo, So I got started with some basic testing and ran into some hurdles. Using the FrontEndUser module I managed to get a new user created. But somehow I dont see a way to connect this specific user with a specific profile page (company page) . What I therefor drafted is the following: Create two templates: - Company (Profile information, company infomation, e-mail adres, password (hashed) ) - - Jobapplication (all information for application) With this structure and the API i`m able to login the user and get the profile information into a session. With that I`m able to grab the company information and make a front-end edit page. Furthermore, I can connect the jobapplication to his parent and therefor: -echo all application (being sole children) on the company page - easily post the parent ID with the jobapplication once a new one is created. Some questions with this set-up : Would this work or am I using a workaround and would it be better to do this differently? While using for instance the FormBuilder Module, am I able to -within 1 formpost- create the companypage and then the applicationpage? This would be helpful for the register form where company`s that havent posted anything yet, can create a profile + post a job. Thanks After some more reading and testing, I think I got it. Process changes a bit, but I now understand the flow. What I`ll do is make a login/register page. Then when user logs in (after registration) I can grab the user->ID. He can then update his company data via a front-end form. I`ll attach the used-ID as a field for that (company)page. When that page is created, I can then let the user add a application and I`ll append that to the company page as a child. Think that will work. I think I would even be able to do this in one form-flow.
  21. Hi all, thanks for all the comments. It seems like there is no standard answer to my question ;-) Happy to started this discussion. For what I brainstormed with the current level of Processwire knowledge, I think I will be very feasable to get all the items in here. Having a look at the Skyscraper example (were jobpenings are the skyscrapers) I just need to add one additional layer (being the applicants). The challenge would be to build a dashboard with (front-end) access control were only the company posted the opening is able to post/edit/see the jobopenings and the applicants. My guess is that this would be very feasible using the current RBAC model in Processwire as the login is quite standard. In essence there would only be two roles defined: #1 me as being the admin and 2# as companies that want to post a jobopening. 2# would only be front-end access to the dashboard. When I find the time, I'll set-up a basic version of this website to test if this will work. I`ll keep you updated on the progress. Thanks!
  22. Hi Cacrura, Perhaps I did the first image indeed via the natice cropped function. My apologies for the confusing.
  23. Hi Horst, I totally understand the concept and process. What I dont under however is that after installing the module the first image I cropped the cropped image was visable in the backend under "homepage afbeelding" as being the sole image to be used in the front-end. The cropped overwrote the uploaded image. Of course the orginal image was still available (in the folder structure). No problem, but just wanted to let you know that I had two seperate behaviour using the plugin. I'll try this evening to replicate the first behaviour.
  24. Hi Horst. I mean the image itself. What I would expect is that the cropped image would replace the uploaded one so the one under homepage afbeelding in the gif. Thanks!
  25. First of all: Great module! I just ran into one issue though, perhaps I`m doing something wrong here, but when i`m accept the image the cropped image is created and available in the assets, but in the not showing (or replacing) the image in the backend.
  • Create New...