LostKobrakai Posted March 8, 2015 Share Posted March 8, 2015 Just use the labels of templates to name them more descriptively. The buttons below pagetables will always show the label and fall back to the name of the template if no label is defined. For the "add new" buttons, there are a lot of them in processwire. Most of them are there, because either the context provides the information about what will be added or the cms can not tell ahead of time what will be added. You can edit them with hooks, different ones dependent on which one you'll want to edit, but not via the admin backend. But this is not the thread to take about this in detail. 1 Link to comment Share on other sites More sharing options...
Qualtext Posted March 8, 2015 Share Posted March 8, 2015 Just use the labels of templates to name them more descriptively. The buttons below pagetables will always show the label and fall back to the name of the template if no label is defined. Labels! This Label-Field in Template was never catching my Eye. Thank you. Link to comment Share on other sites More sharing options...
diogo Posted March 8, 2015 Share Posted March 8, 2015 Look for template label on the template settings. The field is closed when empty, look well. Link to comment Share on other sites More sharing options...
adrianmak Posted April 23, 2015 Share Posted April 23, 2015 (edited) From the screenshot, there are three different page content, Text block with headline, text columns and image gallery could be added. How to do something like that with this module? Edited April 23, 2015 by kongondo Edited for clarity Link to comment Share on other sites More sharing options...
Martijn Geerts Posted April 23, 2015 Share Posted April 23, 2015 You quoted the instructions too Link to comment Share on other sites More sharing options...
DV-JF Posted June 9, 2015 Share Posted June 9, 2015 Hi, I'm using this module to display some different sections on the homepage of a webseite like in this example: https://processwire.com/talk/topic/7459-module-pagetableextended/#entry71793 My home template file looks like this: $page = $pages->get(1021); // This is a Site for storing all sections of the homepage foreach($page->children as $child) { require($child->template .'.php'); }; $mainContent = $out; Here's an example of one of my child-templates: <?php /* section-slider.php - Template File for a Slider*/ // Check if Back- or Frontend if(isset($options['pageTableExtended'])){ $useMain = false; $out = ""; $addJS = ""; } // Check if is in frontend else { $page = $child; }; // Starting output $images = $page->images; $mini = 320; $small = 640; $medium = 900; $large = 1200; $xlarge = 1680; $out .= " <section id='{$page->name}' class='slides'>"; foreach($images as $img) { $out .= "<img src='{$img->width($mini)->url}' srcset='{$img->width($mini)} {$mini}w, {$img->width($small)} {$small}w, {$img->width($medium)->url} {$medium}w, {$img->width($large)->url} {$large}w, {$img->width($xlarge)->url} {$xlarge}w' alt='{$img->description}'>"; }; $out .= " </section>"; // Load JS and CSS Files $inlineJS .= " <script> $(function() { $('.slides').slidesjs({ width: 1200, height: 900, navigation: { effect: 'fade' }, pagination: { effect: 'fade' }, effect: { fade: { speed: 3000 } }, play: { active:true, auto: true, swap: false, effect: 'fade', pauseOnHover: false, interval: 5000 } }); }); </script>"; array_push($cssFiles,"css/slides.css"); array_push($jsFiles,"js/jquery.slides.min.js"); // Check if backend if(isset($options['pageTableExtended'])){ echo($out); } Two questions: 1. I'm wondering if it's possible to redirect the children of the site to the parent-site or to the homepage, when a user tries to visit the childpage directly, so that it's not possible to visit the child-page directly. 2. How are the child-pages sorted? When I try to sort them via drag&drop here: this don't effect the frontpage. I've to sort the child-pages to get the correct sortorder here: Where can I change it, so that the childpages are sorted correctly? Many greets, DV-JF alias Jens. Link to comment Share on other sites More sharing options...
titanium Posted June 10, 2015 Share Posted June 10, 2015 1. I'm wondering if it's possible to redirect the children of the site to the parent-site or to the homepage, when a user tries to visit the childpage directly, so that it's not possible to visit the child-page directly. 2. How are the child-pages sorted? When I try to sort them via drag&drop here: 1. Something like this should work: if($page->url === $_SERVER['REQUEST_URI']) { $session->redirect($page->parent->url); } 2. How are the child-pages sorted? When I try to sort them via drag&drop here: 2. From https://processwire.com/api/selectors/ foreach($page->children('sort=sort') as $child) { require($child->template .'.php'); }; Link to comment Share on other sites More sharing options...
mr-fan Posted July 14, 2015 Share Posted July 14, 2015 Hi Guys, did a small pullrequest on this to get the right labels in the right language... https://github.com/MadeMyDay/PageTableExtended/pull/18 honor goes not to me - clap for wanze instead.... https://processwire.com/talk/topic/3601-field-label-language-problem/#entry35402 best regards mr-fan Link to comment Share on other sites More sharing options...
ottogal Posted January 19, 2016 Share Posted January 19, 2016 Do I just miss something? On the Details tab of a field of type PageTableExtended you can Select a parent for items.But when done, you can't switch back to the option no parent is selected. Is there a way to do it? Link to comment Share on other sites More sharing options...
adrian Posted January 19, 2016 Share Posted January 19, 2016 This is consistent (although not intuitive) throughout PW. You need to click on the selected page and click "unselect". If you don't like this behavior, there is a new module that makes things more intuitive: http://modules.processwire.com/modules/page-list-select-unselect-button/ Link to comment Share on other sites More sharing options...
ottogal Posted January 19, 2016 Share Posted January 19, 2016 Thanks @adrian, hadn't seen that. It's a smart solution - but not easily found... Link to comment Share on other sites More sharing options...
krisj Posted March 21, 2016 Share Posted March 21, 2016 I am trying to understand if I should use the new ProFields Repeater Matrix or PageTableExtended. Does PageTableExtended have any distinct benefits? I haven't had a chance to test thoroughly enough to make the decision yet. Link to comment Share on other sites More sharing options...
mr-fan Posted March 22, 2016 Share Posted March 22, 2016 I haven't tested the new matrix field for now. PTE renders the selected templates/blocks for the editor. So the dev could create a simple visual blockeditor with drag and drop the blocks and prerender them like it looks on frontend or in a other way that fits in the backend like teammembers, slideimages and so on. Some things to mention: - Care for the used templates to render in SEO things - access the single parts are possible if you don't handle this (for example you have all PTE elements under a hidden parent the elements are accessable on frontend, too) - The CSS for prerendering is sometimes a little tricky since it could be that it crashes with the admin styles (only some special classes and maybe fontsizes and so on) you could use .renderedLayout Class on such elements in your special CSS file for PTE. I'm running PTE for pretty much every repeating element that is more complex like contentblocks, sliderimages with text and settings, teammembers, grouping documents and so on...all things that elements in summary are under a rage from 10 to maximum 40. If i need more elements like events or something i'll stick to pages. best regards mr-fan 4 Link to comment Share on other sites More sharing options...
adrianmak Posted April 21, 2016 Share Posted April 21, 2016 In posted screenshot, the text column pagetable isn't fixed in 3 cols ? or it can be in any number of colums, 2, 3 or 4 Link to comment Share on other sites More sharing options...
ottogal Posted August 1, 2016 Share Posted August 1, 2016 @MadeMyDay What about the compatibility of PageTableExtended with PW 3.0.x devns? Link to comment Share on other sites More sharing options...
mr-fan Posted August 1, 2016 Share Posted August 1, 2016 Is working here on a massive setup for blockbuilding....no affect so far. 2 Link to comment Share on other sites More sharing options...
ottogal Posted August 2, 2016 Share Posted August 2, 2016 Thanks mr-fan, I'll try. Link to comment Share on other sites More sharing options...
MadeMyDay Posted August 4, 2016 Author Share Posted August 4, 2016 @all: Was kind of out of business for a while. Will come back and check everything in September! Also some new ideas for this module ;-) 8 Link to comment Share on other sites More sharing options...
ottogal Posted August 5, 2016 Share Posted August 5, 2016 Thanks! Looking forward... Link to comment Share on other sites More sharing options...
phil_s Posted September 7, 2016 Share Posted September 7, 2016 @MadeMyDay Looking forward indeed! Such an amazing module. Running smoothly on ProcessWire 3.0.30 devns here btw. One small quibble: How would you get the sort order from the drag and drop view of the module to correlate to the child pages in the tree view? As Jens pointed out, it seems there is currently no possibility to sync these two up or render/access the module's custom sort order? Cheers! Phil Link to comment Share on other sites More sharing options...
Robin S Posted September 7, 2016 Share Posted September 7, 2016 1 hour ago, phil_s said: One small quibble: How would you get the sort order from the drag and drop view of the module to correlate to the child pages in the tree view? Just wondering why you would need to do this. A PageTable field does not necessarily include all the children of a given parent so the contents/order of the field could never match the children in all circumstances. I would have thought that if you create a PageTable field then you interact with its pages via the field (whether we're talking about the API or the admin interface) rather than the page tree. Personally, I always store my PageTable pages under the admin branch so they're not visible/confusing for clients. 2 Link to comment Share on other sites More sharing options...
phil_s Posted September 8, 2016 Share Posted September 8, 2016 8 hours ago, Robin S said: 10 hours ago, phil_s said: One small quibble: How would you get the sort order from the drag and drop view of the module to correlate to the child pages in the tree view? Just wondering why you would need to do this... I use PTE as a visual editor for modular layout blocks in a project page template of a Portfolio website. The client can create and arrange blocks with various configurations to build the individual project pages. The blocks will get added as children of the project page. The page tree thus looks something like this: home + projects + first project + block-fullwidth + block-fullwidth + second project + block-twohalves + block-fullwidth ... In theory the obvious benefit of using PTE here is that the client can do all the arranging (which is more of a try this and that process) directly in the interface, and preview which order they will appear in the page in in a visual way. In practice though, when I fill the array and specify a sort order for rendering like this: $blocks = $page->children('sort=sort') ..this will render the (manual) sort order from the page tree, not the manual sort order arranged by the client via the PTE interface. I can rearrange the blocks in both views individually and access the page tree custom sort order e.g. via the above–but can't access PTE's sort order. So TLDR: I would like to access and render the custom sort order done via the PTE fields, not a custom sort order done via the page tree. Am I looking at this the wrong way or missing anything? Should I fill the array with find/get instead? Cheers guys! Link to comment Share on other sites More sharing options...
MadeMyDay Posted September 8, 2016 Author Share Posted September 8, 2016 You don't have to refer to the page tree order or use $page->children. Assuming your PTE field is called "layout" all you have to do is: foreach($page->layout as $l){ $layout .= $l->render(); } The field itself holds the connection to its blocks. No matter where they are in the tree (because that's configurable). 1 Link to comment Share on other sites More sharing options...
phil_s Posted September 8, 2016 Share Posted September 8, 2016 1 hour ago, MadeMyDay said: You don't have to refer to the page tree order or use $page->children. Assuming your PTE field is called "layout" all you have to do is: foreach($page->layout as $l){ $layout .= $l->render(); } The field itself holds the connection to its blocks. No matter where they are in the tree (because that's configurable). Oh, nice It seems reading the manual helps as usual. Sorry. @Robin S How do you keep order without the context of the parent? (assuming you are using PTE for a similar setup)? Thanks a bunch guys! Link to comment Share on other sites More sharing options...
Robin S Posted September 9, 2016 Share Posted September 9, 2016 8 hours ago, phil_s said: How do you keep order without the context of the parent? I'm not sure what you mean. It's just as @MadeMyDay explained - the order is stored as part of the field. You just need to get the "block" pages via the field rather than as children of a parent. Instead of... $blocks = $page->children('sort=sort'); ...do... $blocks = $page->my_pagetable_field; 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now