Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/18/2017 in all areas

  1. Hi, Got a couple of sites going live. This is the first one Wolfpie creative agency website london. This is another collaboration with myself and Charlie Crook Design. Using AJAX to fetch new pages so the site feels like a one page app but all the URLS etc work. I was also asked to create a mophing animation of a playful rectangle for the homepage. At points the animation joins with the cutout o and creates the wolfpie logo.
    4 points
  2. The $session->login($user, $pass) is going to return a user object if the user exists and password is correct. Otherwise, the session call will fail. That's why creating the user before the login check works when registering the user. It's okay to build users on-the-fly as long as you sanitize and do your role/permission assignments, etc. If you have a separate login form from the registration form, use one to create and login the user while the other simply logins in. I don't think you'll need to use any extra hashing, PW will compare the hashed value of the supplied password to that stored in the database.
    3 points
  3. Maybe using a forum software with a nice REST API will help you accesing data and performing actions like creating users and log them in. some good modern software are http://flarum.org/docs/api/ http://www.discourse.org
    3 points
  4. For those people who cannot get this to work in PW3, the instructions say to put this in your head: <script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?sensor=false'></script> This actually needs to be: <script src="https://maps.googleapis.com/maps/api/js?key=<?= $modules->get('FieldtypeMapMarker')->get('googleApiKey') ?>"></script> Or however you like to include your JS files. The sensor=false is no longer needed, but the API key is. Seemed to work for me, I havent had time to investigate the inner workings of the module to see if this should be done or not but is just a bug. Happy mapping.
    2 points
  5. By the way, strtok can lead to some unexpected results. Try this: $name = $sanitizer->pageName(strtok('about-us.html', '.html')); echo $name;// outputs 'abou' $name = $sanitizer->pageName(strtok('around-us.html', '.html')); echo $name;// outputs 'around-us' So, you might want to use something else (replace or regex, etc)
    2 points
  6. It's as complex as building such things on your own elsewhere. We have an easy pagination generating module, which just happens to lack an option to render just next/prev links instead of a full pagination. I'm sure Ryan could add those quite easily. Also may I suggest a more readable version of yours. Things are always easier to digest when they're not muddled with html tags. <?php $next = $prev = ''; $total_pages = ceil($pagedata->getTotal() / $limit); if($input->pageNum > $total_pages) // Optional; For page 11 of 10 throw new Wire404Exception(); if($total_pages > 1){ $base_url = rtrim($page->url . $input->urlSegmentsStr, '/') . '/'; if($input->pageNum == 2) $prev = $base_url; elseif($input->pageNum > 2) $prev = $base_url . $config->pageNumUrlPrefix . ($input->pageNum - 1); if($input->pageNum < $total_pages) $next = $base_url . $config->pageNumUrlPrefix . ($input->pageNum + 1); } ?> <?php if($next || $prev) : ?> <div class="pagination"> <?php if($prev): ?> <div class="prev-page"> <a rel="prev" href="<?= $prev ?>">Prev page</a> </div> <?php endif; if($next): ?> <div class="next-page"> <a rel="next" href="<?= $next ?>">Next page</a> </div> <?php endif; ?> </div> <?php endif; ?>
    2 points
  7. Thanks for your ideas on this. I must admit though that I never have a need for the labels to be displayed (I actually think they look horribly ugly), so I am not convinced about the three-state toggle, but I am open to being convinced if enough people would like it. I probably agree with you regarding not needing the new setting to hide bar by default - I added it anyway, just in case it's easier with very small touch screens where it might be hard to hide in the first place - maybe not really that hard? On another note, I just committed another update which adds nicer/simpler exception reporting for the Console panel. I was getting tired of the Tracy "Bluescreen" showing the full stack trace for a simple syntax error in the console. I wonder if at times my changes might hide useful info though, so I'll keep an eye on things and maybe add an checkbox option to turn on the full trace if checked. Please let me know how you find this new approach.
    2 points
  8. @gmclelland - I decided to go ahead with adding this anyway The latest version replaces the existing close (x) button with a hide arrow. This is what it looks like when hidden: In case anyone is wondering, this is quite different to the Enable/Disable button (either from the dedicated panel, or from the panel selector) because with this new option, even when hidden it is still capturing errors etc and when you unhide/show it will instantly show it's information without the need for a page reload. There is also a new module config setting to "Hide Debug Bar By Default". That should be self-explanatory, but keep in mind that once you have clicked on the show or hide buttons, cookies take over controlling its status. Please let me know if you have any problems. Just an FYI - I am not a big fan of this because you won't be alerted about non-fatal warnings/notices while the debug bar is hidden, but I think it's nice to give users the option if they prefer it.
    2 points
  9. We had to add this to our latest project and I am happy to share here. I couldn't find anything on the forums for this so apologies if it has been done before. But there are always different ways of doing things: $firstEntry = $pages->find("parent_id=1037, sort=date_1, limit=1"); foreach (range(date("Y"), date("Y", $pages->get("$firstEntry")->date_1)) as $year) { $start = strtotime(date("$year-01-01")); $end = strtotime(date("$year-12-31")); $count = $pages->count("parent_id=1037, date_1>=$start, date_1<=$end"); if ($count > 0) echo '<li><a href="' . $page->parent->url . $year . '/">' . $year . '(' . $count . ')</a></li>'; } So what is going on: first of all, our pages were children, so we set the parent_id, and our date field is called date_1 we need to get the year of the oldest entry, so that happens with $firstEntry and a simple find next we create an array using a range of years, we start with the current year, then we get the year from our $firstEntry (note: if you have an output format for your date set in the field settings you will want to use $pages->get("$firstEntry")->getUnformatted("date_1") within the foreach) next we create a start date and end date for the year we count if there are any entries for that year if there are display them in a list Your next step would be to create the $input->urlSegment code to display your pages.
    1 point
  10. That's weird but it looks like you're working out of two different directories for the install. You have a _tmp and a tmp. Maybe double check the install directory and make sure that the htaccess file, and wire & site directories exist alongside index.php. Which version of PW are you using?
    1 point
  11. Interesting ideas. I think I would probably allow the subaccounts be properties/fields of the master account that are required to be unique. Maybe create a template for subaccounts and have a select option for specific privileges. Then, based on the page being visited, the appropriate sub-account can be retrieved and the privileges set accordingly. That allows a way to determine which sub-account is being used and if a post is created, can use the appropriate account name associated with the master account. In conjunction with clsource's suggestion for a decent REST api, I don't think it would be too difficult.
    1 point
  12. Thanks, but I actually found the hook priorities using your awesome TracyDebugger module! ?
    1 point
  13. Ok, on line 294 of TracyDebugger.module, I changed it to $this->addHookAfter('Page::render', $this, 'addCustomStuff', array('priority'=>'100.7')); After I did this, I started seeing the toggle link on the frontend. The templateEngineFactory module (Page::render() TemplateEngineFactory::hookRender()) had a priority of 100.5. TracyDebugger had a priority of 100.4, so it ran too early. What do you think is the best way to fix this?
    1 point
  14. Just as a follow-up in case people wonder, here's a copy of the message I sent to @adrian
    1 point
  15. The site that is having a problem is using the Twig template engine using https://github.com/wanze/TemplateEngineFactory and https://github.com/wanze/TemplateEngineTwig. I wonder if it is because the TracyDebugger module is using a hook to add the javascript? I'm not very familiar with hooks, but maybe the hook doesn't run after Twig has compiled the markup?
    1 point
  16. No js errors in the console. Tried in different browsers as well. I see the old 'X' button, I just don't see the new toggle button. Sorry, the site is local. I'll keep looking into it.
    1 point
  17. The reason is quite simple: $pages->find() is not using viewable(). Only findOne seems to be using it. If you need access contraints on the database level have a look at DynamicRoles.
    1 point
  18. Thanks @adrian that's exactly what I was asking for. I like the configuration as well. I upgraded Tracy on two local sites, one site works correctly on the frontend and backend. The other site doesn't show the toggle on the frontend, it works fine on the backend. I'm not sure why yet. I have tried uninstall/reinstalling the module. I tried clearing the browser caches. I tried refreshing the PW modules. All I see on the frontend is the old Tracy debug bar. Do you have any ideas what is causing this?
    1 point
  19. I just made the 0.3.0 version the new stable version. I've also added 0.3.1-beta with a new migration type: AccessMigration. This migration is only meant to change access rules for templates like shown below. List templates with changes, prepend a + or - if the useRoles setting does need to change. For those templates then list all roles which have changes (can be none) and supply which types of access should be added or removed. <?php class Migration_… extends AccessMigration { public static $description = "Update template access rules"; protected function getAccessChanges() { return [ '-blogpost' => [], // Remove useRoles from blogpost template '+basic-page' => [ // Add useRoles to basic-page 'subscriber' => ['+view'], 'editor' => ['+view', '+edit'], 'admin' => ['+view', '+edit', '+create'] // +create does require +edit ], 'tag' => [ 'subscriber' => ['-edit'], 'admin' => ['+full'] // view, edit, create and add ] ]; } } Edit: Had to remove the automatic +edit for +create, otherwise it's not clear to what to revert on rollbacks.
    1 point
  20. Hi, My page template contains fields of type pagefield (among other fields). When adding or updating pages, I use blank values for these page fields. The CSV looks something like this: title,contentTextarea,filterA,filterB First page title,"<p>Text</p>",, Second page title,"<p>Text</p>",, Now BCE/PW generates a new page as a child of the page that is defined as the parent of the pages that are selectable through the page field. Or simpler: adding/updating results in one new filter inside of both filter groups. The new pages have an empty title field. What value do I have to enter for the page fields in the csv to not select a page (filter) and to not generate new pages (filters)?
    1 point
  21. @celfred, regarding the optimisation, yes, please start a new topic. I, for one, I am curious why you have to load 5000 pages! .
    1 point
  22. What @Robin S said. Good idea to sanitise that name though . I'm sure Robin just forgot. $name = $sanitizer->pageName(strtok($input->urlSegment1, '.html'));
    1 point
  23. For the URL /products/product-one.html, as kongondo says ".html" will not be recognised a valid URL segment in the template for "product-one". But "product-one.html" would be a valid URL segment in the template for "product". So you would need to enable URL segments for every template and at the start of every template file you could have something like this: if($input->urlSegment1) { $name = strtok($input->urlSegment1, '.html'); $p = $page->children->get("name=$name"); if($p->id) { echo $p->render(); $this->halt(); } else { throw new Wire404Exception(); } }
    1 point
  24. That's because a dot (.html) is not considered a segment (I think?). Segments take the form of /a/b/c/, i.e. separated by forward slashes. I am not sure whether using the regex feature would allow for this. Have a look here. A different approach here as well:
    1 point
  25. Thanks - just tried the Hide button and I feel that it should have some extra space around, eg. padding: 0 3px 0 5px; Plus I think it would look nicer to have the module icon (the bug) instead of the arrow. You could play with opacity to distinguish its on/off state.
    1 point
  26. FYI - that last change regarding exception handling in the Console panel only seems to be working here on PHP 7 - on PHP 5 it reverts to the full stack trace result. Not sure if I overlooked something or what just yet, but if anyone feels like testing a simple syntax error in different environments and let me know what happens, that would be appreciated. Thanks!
    1 point
  27. @Mike Rockett Thanks for the pointer. Didn't think about it. I was looking at the default site profile template files and they all have it in the first line. My post was meant as an example on how you can approach the problem with search/replace and regex. People can adjust the regex to fit their needs. However, I put together a new regex, that searches for <?php in the first line of a document which is not followed by any number of spaces, tabs or newlines and 'namespace ProcessWire;'. You can see it in action here. remove the first line and then add any number of new lines between '<?php' and 'namespace ProcessWire' to see that it works. It only picks up <?php in the first line of the document. Here it is for convenience (^<\?php(?![ \t\n]*namespace ProcessWire;)[ \t]*)/g
    1 point
  28. szabesz, yep that's what I meant.
    1 point
  29. @adrian The tracy debug bar takes up a lot of screen real estate, how about adding an option for collapsing the tracy debug bar by default into a "Debug" toggle link that shows fixed in the bottom right hand corner? When a user clicks the "Debug" link, it would show the entire bar. Currently a user has to refresh the whole page to bring back the toolbar if a user click's the "x" to close the toolbar. With a toggle link it can appear or disappear. Just a thought..
    1 point
  30. Hi @Eric7, Welcome to ProcessWire and the forums. Have a read here:
    1 point
  31. A couple more options... At the top of the file for the template of pages you are including inside another page: if(empty($options['pageStack'])) throw new Wire404Exception(); if($page->url == $_SERVER['REQUEST_URI']) throw new Wire404Exception(); A related thread:
    1 point
  32. To be honest, I've missed the whole world of conditional autoloading of PW modules... Dropping off support for 2.2 isn't any issue. There will be older perfecly functional emo releases available if someone needs it. So I think I'll go ahead and make this change same time I'll add PW namespace to the module - which should happen pretty soon. Thanks for the notice!
    1 point
  33. Hey @LimeWub, I found a soultion to your question. If you go to the template being used by slideshow and navigate to the "Access" tab, you can achieve what you are after. In my case (for the test), I simply unchecked view pages for guest, and selected "Redirect to another URL" which allowed me to keep the page from being accessed by someone not already logged in with the proper credentials.
    1 point
  34. Hello @darkmesaia I often recommend these to start with: Important concepts: https://www.smashingmagazine.com/2016/07/the-aesthetic-of-non-opinionated-content-management-a-beginners-guide-to-processwire/ Understanding Processwire Templates, Fields and Pages: https://medium.com/@clsource/understanding-processwire-templates-fields-and-pages-201aecd0a1a4#.m9yquavll Step-by-step guide, 4 part tutorial: http://blog.mauriziobonani.com/processwire-basic-website-workflow-part-1/ Approaches to categorising site content:
    1 point
  35. @MaryMatlow, Have a look at this, this and this post plus the ensuing discussions.
    1 point
  36. Just because it looks like valid json doesn't mean it's in the correct format for Migrator. But could you please make sure you are using this version of Migrator: https://github.com/adrianbj/ProcessMigrator/tree/3e2121b8fdb68e9d9dc0c6aca8aae75e923a2669 It is two commits behind, but it looks like some bugs were introduced since that commit. As an update on this project. I still do want to get back to it, but I am now going to wait until Ryan completes all the new core page migration tools so I can use those new core methods. Will wait and see exactly what functionality he builds and extend from there if needed.
    1 point
  37. I guys, fresh new website to showcase https://iloetscher.com/ iLötscher is a Swiss company based in Zürich that provides informatics services for Apple devices and networks. We are still working on the English version and the private area. ProcessWire wise, the website is quite simple and the only non-core modules used are the Pro-fields Table and Hanna Code — both, together with Repeaters, to support the creation of the price tables: SSL is provided by the free Let's Encrypt, that I heard from in this forum (Thanks guys!). The hosting didn't support it (and I didn't have Shell access) but they were happy to install the Let's Encrypt extension for Plesk. Just wanted to let you know that it is worth insisting a bit, in case you encounter the same problem. For the time slot reservations we are using Calendly. It works quite well, and the options for embedding the system on the wesite are very flexible also. The site is responsive, of course. Feedback is more than welcome, thanks!
    1 point
  38. The Console Panel now has a History stack and a separate Snippets stack! Hi everyone - this has been a long time coming. It was originally suggested by @bernhard back in early November. I want to thank @bernhard for the idea and feedback on draft versions, and @tpr who has contributed many ideas, style suggestions, and code to this functionality - sincere thanks to both of you! Snippets are automatically saved to the tracy config settings entry in the modules database table so that they are available on other browsers/computers have a dedicated save button - they are not saved automatically when running code save button only available when loaded snippet code is different from saved version so you know whether you have made changes has the ability to sort alphabetically or chronologically (date modified) no limit of number of snippets stored snippets can be deleted - a ✖ icon appears when you mouseover a snippet in the list History items are saved to local storage automatically saved when you "run" code comes with "Back" and "Forward" arrows for moving between history items currently stores maximum of 25 items - let me know if you think this needs adjusting Some other miscellaneous changes when running code, output is now appended to the results panel (like your browser dev console) you can used ALT/OPT+Enter keyboard shortcut to Clear and Run the "Clear" button now clears the results panel, but leaves the code intact Future ideas ability to easily export/import snippets to stack your ideas Please let me know if you come across any bugs or weirdness with anything - it's still pretty early stages!
    1 point
  39. This isn't tested, but i use this general sort of thing all the time to change page URLs. It is within the hook function that you need to deal with your logic of when to add the .html and when not to, you will need conditional statements... /** * This hook modifies the default behavior of the Page::path function (and thereby Page::url) * * */ wire()->addHookBefore('Page::path', function($event) { $page = $event->object; if($page->template == 'something') { $event->replace = true; $event->return = $page->name . '.html'; } }); Snagged from here originally:
    1 point
  40. 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.
    1 point
  41. I've had to use DT for some rather large page results before (1000+) because it was the requirement of the customer. kongondo did a great job showing how easy it is to use PW alongside DT. Sometimes, the pages might need to be fetched with real time results and without reloading the current page when doing searches. I thought I’d mention the good old legacy format that DataTables still supports because I prefer it over the new API’s requirement to issue column information when using PW. Here's how a simple SSP file might look like using the legacy format: // iDisplayStart helps in pagination as it keeps track of what record to start on when displaying results. $iDisplayStart = intval($_GET['iDisplayStart']); // iDisplayLength is how many records are displayed on the screen at once based on the // selection of the Records select box $iDisplayLength = intval($_GET['iDisplayLength']); // Start with an empty response array $response = array(); // Get some pages. Limit results to whatever $rows = $pages->find("template={$someTemplate},limit=1000"); // Create the response array that DataTables needs foreach ($rows as $row) { // Get fields as needed $name = $row->name; $comments = $row->comments; // sSearch is the string typed into the search box by a user // Assuming searches are case-insensitive, make the search string and searchable field lowercase $sSearch = strtolower($_GET['sSearch']); // User has typed something so the results need to be filtered by hits if($sSearch != '') { // The search has found a hit in this record if(strpos(strtolower($comments), $sSearch)){ // Add the hit to the response $response[] = array( $name, $comment; } } // User has not typed anything in the search bar so return all results elseif($sSearch == ''){ $response[] = array( $name, $comment ); } } // Now that we might have results, send it back to the requesting page if(!empty($response)) { $results = array( // sEcho refers to the page of pagination that is being viewed "sEcho" => intval($_GET['sEcho']), // Number of pages returned in total "iTotalRecords" => count($rows), // Number of filtered pages found based on search "iTotalDisplayRecords" => count($response), // Use array_slice for partition the result for pagination // aaData is the array that DataTables uses for data that needs to be displayed "aaData" => array_slice($response, $iDisplayStart, $iDisplayLength) ); // Finally send the results echo json_encode($results); } Obviously the _GET variables would need sanitizing and such. In addition, the old bDeferRender option for DT is good to use when loading large sets of data into the table since it will only the needed visible rows will be drawn at any given time.
    1 point
  42. $templates->get("package")->fields->getField("body", true); $templates->get("package")->fields->getFieldContext("body");
    1 point
  43. You could also turn on mySQL's general_log and then tail -f the log file while you step through your code during debug.
    1 point
  44. Hi guys, just a quick follow-up: I now have imported the 4000+ users in PW; using the "normal" user template, spiced up with the custom data fields I need for the user-data stuff from the old forum. This worked, and the lister instance which does put out the user data in the backend is running fine and without problems. So I have no idea what exactly the difference is, since I copied my custom user template off the internal "user" template - but this way now, everything works smoothly. cheers Tom update: (just an aside: i have currently 40,000 posts imported as pages and no hickup in the backend.) So I'll mark this as resolved, since this is not a performance issue of the lister, but something about the combination of a large amount of users, custom-template, and the lister.
    1 point
  45. … and yet another update this time I imported "my" 4000 users as normal pages, no roles, no password, just the data. And guess what? The lister is running fine and snappy. Next up is a test how the "users" behave in the lister if I use the systems "user" template, not a custom one, maybe I can narrow down what's causing the timeout.
    1 point
  46. Just thought you guys might like to know that the priority setting just got another user Needed to solve the conflict between RedirectIds and 404Search modules. Thanks again Ryan for thinking of everything!
    1 point
  47. Well, I'm no pro at this and you could probably improve it, but here's my attempt which serves my current needs pretty well: /** * Creates a repeater field with associated fieldgroup, template, and page * * @param string $repeaterName The name of your repeater field * @param string $repeaterFields List of field names to add to the repeater, separated by spaces * @param string $repeaterLabel The label for your repeater * @param string $repeaterTags Tags for the repeater field * @return Returns the new Repeater field * */ public function createRepeater($repeaterName,$repeaterFields,$repeaterLabel,$repeaterTags) { $fieldsArray = explode(' ',$repeaterFields); $f = new Field(); $f->type = $this->modules->get("FieldtypeRepeater"); $f->name = $repeaterName; $f->label = $repeaterLabel; $f->tags = $repeaterTags; $f->repeaterReadyItems = 3; //Create fieldgroup $repeaterFg = new Fieldgroup(); $repeaterFg->name = "repeater_$repeaterName"; //Add fields to fieldgroup foreach($fieldsArray as $field) { $repeaterFg->append($this->fields->get($field)); } $repeaterFg->save(); //Create template $repeaterT = new Template(); $repeaterT->name = "repeater_$repeaterName"; $repeaterT->flags = 8; $repeaterT->noChildren = 1; $repeaterT->noParents = 1; $repeaterT->noGlobal = 1; $repeaterT->slashUrls = 1; $repeaterT->fieldgroup = $repeaterFg; $repeaterT->save(); //Setup page for the repeater - Very important $repeaterPage = "for-field-{$f->id}"; $f->parent_id = $this->pages->get("name=$repeaterPage")->id; $f->template_id = $repeaterT->id; $f->repeaterReadyItems = 3; //Now, add the fields directly to the repeater field foreach($fieldsArray as $field) { $f->repeaterFields = $this->fields->get($field); } $f->save(); return $f; } And here's an example of calling it: $f = $this->createRepeater("sc_promos","sc_promo_active sc_promo_code sc_promo_discount","Promotional Offer","shoppingCart"); You can then use $f to add your new repeater field to a fieldgroup/template.
    1 point
  48. That's exactly what I asked myself! Editing using the forum editor was a pain! And with such a long post, it was going all crazy on me! Next time I'll post on my site ...which I am starting soon anyway. Edit: I've just seen a Word to BBCode macro...should have used that; would have saved me some pain!
    1 point
  49. Just wanted to add a couple more notes to this: Using a 'summary' field I think it's more common on this type of page that you would display a summary of the news story rather than the whole news story... and then link to the full news story. To display a summary, you could have a separate 'summary' field in your template, which would be just a regular textarea field where you would have a 1-2 sentence summary of the article. And you would display this 'summary' field rather than 'body' field in the news_index template. If you wanted to autogenerate a summary from the 'body' field (rather than creating a new 'summary' field), you could just grab the first sentence or paragraph of the body and use that as your summary. This is how I usually do something like that: <?php // make our own summary from the beginning of the body copy // grab the first 255 characters $summary = substr($story->body, 0, 255); // truncate it to the last period if possible if(($pos = strrpos($summary, ".")) !== false) { $summary = substr($summary, 0, $pos); } That's a really simple example, and you may want to go further to make sure you are really at the end of a sentence and not at an abbreviation like "Mr." In the example that Moondawgy posted, it makes sense to autogenerate a summary (if he needed it). But in other cases, the 'body' can be quite long (and take up a lot of memory), and it makes more sense to maintain a separate summary field if you have to keep a lot of pages loaded at once. This is really only an issue once you get into hundreds of pages loaded at a time. It's not an issue in these examples, but I just wanted to point it out. Autojoin Using the 'autojoin' optimization can increase performance on fields that get used a lot. Not using it can reduce the page's memory footprint. What is more desirable in each instance depends on your situation. In this news section example, the date and body fields would benefit from having 'autojoin' turned ON. See this page for an explanation: http://processwire.com/talk/index.php/topic,32.0.html
    1 point
×
×
  • Create New...