Jump to content

jploch

Members
  • Content Count

    143
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by jploch

  1. EDIT: Turns out it is still working with PW 3.0.144. The error happens when you have two image fields and one of them is empty. I had to make both image fields an array in the settings to solve the error. now everything works as expected. Maybe someone can confirm this bug and make a suggestion how to solve it in the module code?
  2. I tried this with PW 3.0.144 and it's not longer working. Showing these errors on the frontend, when a site with an image inside cke is rendered: 2× PHP Notice: Undefined variable: image in .../TextformatterSrcset/TextformatterSrcset.module:178 2× PHP Notice: Trying to get property of non-object in .../TextformatterSrcset/TextformatterSrcset.module:178 1× PHP Notice: Undefined variable: image in .../TextformatterSrcset/TextformatterSrcset.module:182 Any Ideas how to fix this? Would be cool to still be able to use this helpful module
  3. Looking at other modules, I think I have to create a process module that would create a page under admin at module install (e.g. admin->setgriddata). The process module would have the code to save the ajax request in the pageTable Item/page. Or is there better way to do this? Sorry for all the noob questions! Iam new to module development 🙂
  4. I found a bug when using this module on a page with a repeater matrix field. After adding a new page from the adminbar, the module redirects to the repeater page that lives under admin->repeaters->repeater-field-name->page instead of the real parent page. A message is shown "This page has no process assigned". However the page gets created under the correct parent page. So just the redirect is wrong. This only happens with the modal option. Can someone confirm this?
  5. This is exactly what I want to do 🙂 I will try to do it with ajax, thanks for your suggestions!! Right now Iam busy with other projects, but I will try this as soon as I can get back to it. I will keep you posted.
  6. This module is great! It would be nice if there was an option to stay on the edit view after saving a page. Currently the module redirects to the browse view. I had some clients complaining about the redirect as they have to edit long pages and save a lot and than have to constantly click edit again..
  7. this looks very promising! Can you give an example on how to render a page reference field with this module. I tried it with this code in the the markup field: <?php // Render for frontend and Backend if($page->block_page) echo "{$page->block_page->render()}"; ?> My template has the block_page as well as the markup field.
  8. Hi! Thanks for answering! For my drag/resize page builder module I need simple text fields to store position data for every PageTable item/page (like Y=10 X=6 Width=4 Height=8). I have to change these values dynamically with javascript. Adding these directly to the sub-templates renders them, so they are not accessible with javascript. What do you mean by hidden fields? I could add a field to my main template, where the PageTable lives and store the item positions as one big JSON array. But I would prefer to have the fields added to the sub-templates for the PageTable items/pages, so its easier to output the positions. Iam still very new to module development (this is my first attempt) and not very good with php. So I feel much more comfortable with Javascript/jQuery but Iam learning. I tried to modify the PageTableExtended Module code to add my fields like this (before I added the fields to my sub-templates) <?php foreach($pagesToRender as $p){ $itemID++; $layoutTitle = $p->template->$label ? $p->template->$label : $p->template->name; $ext = "." . $this->config->templateExtension; $template_name = $p->template->altFilename ? basename($p->template->altFilename, $ext) : $p->template->name; $templateFilename = $this->config->paths->templates . $this->pathToTemplates . $template_name . $ext; $parsedTemplate = new TemplateFile($templateFilename); $parsedTemplate->set("page", $p); $parsedTemplate->set("isAdmin", 1); $parsedTemplate->options = array('pageTableExtended' => true); $p->of(true); $iconClass = "fa-angle-down"; $activeClass = "pte-open"; $statusClass = ""; //get input fields for grid item positions (they are part of the sub-template) $data_gs_height = $p->getInputField('data_gs_height'); $data_gs_width = $p->getInputField('data_gs_width'); $data_gs_x = $p->getInputField('data_gs_x'); $data_gs_y = $p->getInputField('data_gs_y'); //how to set input fields for grid based on html data attribut? I would normally do this with JS.. if($p->is(Page::statusUnpublished)) $statusClass .= " pte-unpublished"; if($p->is(Page::statusHidden)) $statusClass .= " pte-hidden"; if($p->is(Page::statusLocked)) $statusClass .= " pte-locked"; if($this->collapseUnpublished && $p->is(Page::statusUnpublished)){ $iconClass = "fa-angle-right"; $activeClass = "hiddenOnStart"; } $layout .= ' <div data-id="item-'.$itemID.'" class="'.$statusClass.' grid-stack-item" data-gs-height="' .$p->data_gs_height. '" data-gs-width="' .$p->data_gs_width. '" data-gs-x="' .$p->data_gs_x. '" data-gs-y="' .$p->data_gs_y. '"> <div class="grid-stack-item-header"> <a href="#" class="toggleRenderedLayout"> <i class="toggle-icon fa '.$iconClass.'"></i> </a> <span class="renderedLayoutTitle '.$activeClass.'">'.$layoutTitle.'</span> <a class="InputfieldPageTableEdit" data-url="./?id='.$p->id.'&modal=1" href="#"> <i class="fa fa-edit"></i> </a> <a class="InputfieldPageTableDelete" href="#"> <i class="fa fa-trash-o"></i> </a> </div> <div class="grid-stack-item-content renderedLayout '.$activeClass.$statusClass.'"> <div class="grid-stack-item-content-inner"> '.$parsedTemplate->render().' <div class="grid-stack-inputs"> '.$data_gs_width->render().' '.$data_gs_height->render().' '.$data_gs_x->render().' '.$data_gs_y->render().' </div> </div> </div> </div>'; } $out = '<div class="grid-stack">'.$layout.'</div>'; ?>
  9. Reading the whole thread I now understand that the option to auto select the new page is already implemented. However, for me this is not working. I have the page reference field inside a repeater matrix field. When I create a new page, save and close the modal, the new page is not selected. Is there something that Iam missing? EDIT: It works with page auto complete. This is fine for my use case, but it wasn't clear that ist not working with the other options. Maybe this could be added to the module description.
  10. Can someone help me with this? How can I add input fields to the rendered Items that don't get rendered and that i can access with javascript? I need to also save these fields into the database when the page is saved. Would be awesome if someone more experienced could point me in the right direction.
  11. I really like this module and it works great. Would it be possible to have an option to create new pages without inserting the title and selecting the template each time? So if I select a template in the field settings and the title field in that template is set to hidden and not required, it would directly open the modal to edit the page, when I click new. Iam currently using a page field in a repeater matrix field to create reusable pages for a certain parent (sort of like how pagetable is doing it natively), but its not intuitive to type in a title and hit publish each time. EDIT: I solved this by changing the setting "name format for children" in the family tab on the parent template (under where the pages are created) and defining a template for the children. That skips the title and template screen, when adding new pages with the page field. Nice! It would be awesome if the new page gets automatically selected after closing the modal. I think that would be more user friendly, because usually you want to select the page you just created right?
  12. Hey! Its me again 🙂 Iam currently experimenting with this module, to make the pagetable block items draggable and resizable (with some JS) and output them with CSS Grid. My setup works already, but to save the item positions I need fields to store the data in (like Y=10 X=6 Width=4 Height=8). So my question would be: How can I add fields to the rendered Items that don't get rendered and that i can access with javascript? Changing the module files would be ok. My goal is to make a new inputfield with this, so I made a new version/copy of the Page Table Extended Module. @MadeMyDay I hope it is ok for me to build that on top of this module. Thanks in advance!
  13. Nice! Thanks for the quick update! After I updated to the new version, the permission 'trigger-db-backup' wasn't available. I created it manually and now it works. Maybe the permission wasn't created because I updated, rather than installing a new copy? Anyway great update, triggering the backup on login is a nice option!
  14. Hey Kixe! Thank you for this great module! I use it quite often. For most projects I need the backup to get triggered when the client logout. I don't want to give the client the backup permission, to prevent them to mess things up. From your comment above it seems the permission is not needed. But when I logout without the backup permission, the backup is not working. It would be nice if the backup gets triggered by any user on logout, or at least an option for this.
  15. Hey folks! Here is another question: I need the AsmSelect to use the same order as the page tree. In the dropdown list the order is fine, but when I add a new page/marker it gets added at the bottom. I don't need the manual sorting, because I want to use the pagetree to sort the markers. Iam not experienced with hooks. Can someone point me in the right direction, where/how to change the sort of the AsmSelect?
  16. Hey folks! For a project I am working on, I use the nice Image Marker Module. This Module uses AsmSelect, to add the markers. Each marker is a page. Now I need the AsmSelect to use the same order as the page tree. In the dropdown list the order is fine, but when I add a new page/marker it gets added at the bottom. Iam not experienced with hooks and I could not find the line in the AsmSelect Module netcarver described. Can someone point me in the right direction?
  17. This module is really nice! I also need float values for the coordinates, to make the placement of the markers more accurate. I did everything Torsten suggested, but my values are still int: I changed the DB and the module files (FieldtypeImageMarker.module: line 341 + 342, InputfieldImageMarker.module: 251 + 252). And in the js I removed the "Math.floor" on line 307 and 308. What else is there to change? BTW. I think floats are a better default that int, because the markers should be accurate. Maybe this can be changed in a future update? EDIT: I Solved it now. You also need to change ImageMarker.php on line 41 and 57.
  18. This is an interesting topic! Iam a designer that learned to code and PW really helped me improving my coding skill. I don't want the client to control the layout/design to much. In my experience this results in clients messing up the design of the website. So the functionality to change the design should be configurable to a certain role. But I would like a way to change the layout of my blocks in the backend without touching my template code. Ideally in a WYSIWYG way. So I would like to only have one template for all my pages with blocks that I define. A workflow that would make sense to me, and would save me a lot of time (for larger websites with a lot of different layouts per page): 1. The client would add blocks to a page, which layout in a default way (that I define). If the default way is not good enough, proceed to step 2-4 2. The client saves the page without publishing 3. I would edit the design right in the PW backend and show it to the client. 4. The client approves the design and the page gets published I implemented a solution using blocks with PageTableExtended and it worked quite good, but had some things that could be improved, like ajax editing the content, without the need of opening a modal to edit the content. I will make a post on my use case soon. Looking around in the forum I also found this post by Theo (he uses a WYSIWYG wich is far superior to mine from a usability standpoint): Demo: http://theowp.bplaced.net/upload/pics.html http://theowp.bplaced.net/upload/prev3.html
  19. This worked for me. Thank you for the update!
  20. Thanks for looking into it! I set autoload to true, but its not fixing my issue. After testing I found out that the issue is caused by this line in my templates for the blocks that being referenced: if(empty($options['pageTableExtended']) && empty($options['pageStack'])) throw new Wire404Exception(); So I removed it and its working fine. but now my PTE blocks that are stored under admin–>siteparts are viewable on the frontend for everyone. I don't want these pages to show up in search results, are there any other things I ca do to prevent that?
  21. template for block with page reference field: if($page->block_page) echo "{$page->block_page->render()}"; And on my template to render the site with PTE: $content = ""; if(count($page->pagebuilder)>0){ foreach($page->pagebuilder as $l){ $content .= $l->render(); } } include("./_main.php"); $content is a variable in _main.php where the whole markup for the site is rendert. (All blocks for PTE are stored under admin->siteparts. They are configured to automatically get a title)
  22. Yes I mean page reference field. There is only one PT/PTE field on the page. When I remove the $page->block_page->render(); from the template for that block (with the page reference field), everything is working fine. I use the page reference field to add blocks that where added to another page with PTE, so that the blocks can be reused on another page. Hope that makes sense to you 🙂
  23. I managed to render blocks from page reference fields inside PTE. In my template for the page reference block I render the page like this: $page->block_page->render(); But when I save the modal after I add/change a block I get the error and the changes only appear after I save the page with the regular Save button from the page: Failed to ready module: FieldtypePageTable This only happens if the PTE has a page reference block. Any Ideas why this error is happening?
  24. Thats fine with me. If I use Mamp with PHP 5.6 this issue is solved. No worries! Keep up the good work! Looking forward to use this one day 🙂 I still have no clue what stops the markup regions from working though.
×
×
  • Create New...