Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/12/2017 in all areas

  1. Sorry to resurrect an older post, but I just had to provide an update. This is Margaret (also known as Margie, the one who started this thread - that's my personal account), as we got the go ahead to replace our current CMS with ProcessWire! This is our new AAD web team account. The web team is comprised of Warwick (web manager), myself (web developer) and Narelle (web developer). AAD = Australian Antarctic Division. We're just getting started at the moment, testing out some modules and so forth, but I expect you'll be seeing some more of us around the forums as we get further into moving all our sites across to ProcessWire!
    12 points
  2. There's native `Fieldset in Tab` for creating editor tabs, but sometimes it could make more sense to put a field that's not directly related to `Content` into `Settings` or `Children` tab (such as for body class or some toggles that I see being used often). You can use the hook below to move fields between the tabs. // site/ready.php wire()->addHookAfter('ProcessPageEdit::buildForm', function (HookEvent $e) { // make sure we're editing a page and not a user if ($e->process != 'ProcessPageEdit') return; // RESTRICT BY TEMPLATE // $page = $e->object->getPage(); // if ($page->template != 'home') return; // RESTRICT BY ROLE // $user = $e->user; // if (!$user->hasRole('editor')) return; $form = $e->return; $contentTab = $form->children->get('id=ProcessPageEditContent'); $settingsTab = $form->children->get('id=ProcessPageEditSettings'); // $childrenTab = $form->children->get('id=ProcessPageEditChildren'); // if page template is set noSettings = true, $settings will not exist if (!$settingsTab) return; // MOVE TITLE FIELD TO SETTINGS TAB $title = $contentTab->get('title'); if (!$title) return; $contentTab->remove('title'); $settingsTab->prepend($title); });
    10 points
  3. I've encountered the same problem with many people specifying that any bids for a web site must be Wordpress. I come from a database development background, mostly doing Microsoft Access desktop apps, but also some web development, and even made my own CMS way back when Wordpress was only a dream waiting to happen. I'd describe Processwire as being data driven, whereas Wordpress is content driven. By that I mean that Wordpress revolves around posts and pages, whereas although Processwire calls them Pages, Processwire pages are really totally different beasts to Wordpress pages, and are really a less nerdy name for what are really objects, which can have any properties you like, and may not even be 'pages' in the publishing sense at all. If you want a blog using an existing theme, Wordpress is the way to go. If you want a web site that has to deal with pretty much any data structures you want to throw at it, Processwire is the way to go. Wordpress needs a plugin to do custom field types, and plugins to do lots of other things, and those plugins don't necessarily peacefully coexist or have consistent UIs. With Processwire, you start off bare-bones but can build anything you like quickly and efficiently. The development process for me is far more like building something with Microsoft Access, in that you design you data structures (fields, and I believe with Profields, you can actually do tables, but I haven't had enough work to justify that yet) and then add them to templates which are like forms or reports in Access. Site profiles are a bit like predefined Access templates for specific tasks. Perhaps it would be good to work towards a wider range of free and premium site templates available, but rather than modelling them on Wordpress themes, model them on Access templates, then people will see that Processwire is more of an app platform than just a web site CMS. Processwire can't really have 'themes' in the Wordpress sense, because those rely on assumptions about what data structures you have, whereas with Processwire, a site profile has to define data structures as well as presentation, as Processwire doesn't have any inherent data structures like posts or pages in a Wordpress sense. The reason Access was, and still is so wildly popular amongst a small group of developers is that it is the quickest way to develop a desktop front end for pretty much any kind of database app you might want to build, even if it has some inherent issues that IT departments don't always like. There are a few things I wish Processwire did differently, eg I'd like referential integrity at the database level, and I'd like to be able to use other database systems other than mySQL/MariaDB, (eg PostgreSQL, SQL Server) , but the reality is it's the most efficient tool I've found for quickly defining and presenting any kind of data on the web. With Wordpress, structured data is an afterthought, with Processwire it's core.
    9 points
  4. Best of luck with the project Margie! If you happen to need any help from a marine scientist come web developer who speaks Strayan, just let me know ?
    5 points
  5. I've checked out the module source and it doesn't seem to have a customizable `from` address field, so WireMail defaults to admin email. public function ___send() { $from = $this->from; if(!strlen($from)) $from = $this->wire('config')->adminEmail; if(!strlen($from)) $from = 'processwire@' . $this->wire('config')->httpHost; Add this line to site/config.php $config->adminEmail = 'my@email.com'; If you want to change the admin email for just LoginRegister.module, than put the line above where you execute the module. $config->adminEmail = 'my@email.com'; $modules->LoginRegister->execute();
    4 points
  6. I think this could be said of any CMS really. I have found though that the barrier to entry with PW is low, and the learning curve is steady. It's not like you get to a point then get totally stuck like I've experienced in the past. I've found knowledge of one thing leads nicely to the next. This is what keeps me interested just keep dangling that carrot.
    3 points
  7. I'd say that this depends entirely on your use case. For an example, we have a couple of sites with a large amount of pages, where each page potentially holds a very large number of images, and those images tend to be highest possible digital camera quality. If there wasn't a limit in place, the site would get unmanageably large in no time. At the same time we know where and what those images are used for, and for those use cases ~1200px width/height is more than enough. On the other hand if you know that there won't be a massive amount of images or you have a notable amount of disk space to spend, and you really do need images in 2400px+ sizes, then by all means keep the full versions. In most cases I'd argue that a sensible limit makes sense, but obviously some cases – storing images used for print stuff, very large header images, etc. – demand that you set the limit pretty high, or even leave it off. Just thinking out loud, really. Probably nothing there that you didn't already know
    2 points
  8. One more option (and to state the obvious): you can simply upload ads.txt to the site root and then access it at www.xxx.com/ads.txt like you would expect.
    2 points
  9. There's Fieldset in Tab (Open) for that. Create one, add to a template and move fields that you want to show in the tab between tabField and tabfield_END fields Which gives you a tab like this
    2 points
  10. Sorry for the trouble you had with the Batch Child Editor module. I believe that was fixed a LONG time ago. The module is now up to version 1.6.13 Please consider installing the ProcessWire Upgrades module so you will be notified when there are updates to installed modules.
    2 points
  11. Thanks for sharing. This would make for a good recipe on https://processwire-recipes.com/
    2 points
  12. if you tell us why you did this we might suggest another solution for example you could create a page with a file field. then you would have an easy to use file uploader with all the other pw features like access control and so on and you could access the file via it's url ( /site/assets/files/1234/your-file.txt ). that might or might not be a better solution depending on your usecase...
    2 points
  13. The reason why Processwire doesn't have a whole lot of themes is that it makes no assumptions about what data structures you want. Wordpress has Posts and Pages. Processwire has things called Pages, but they're really completely different to Wordpress pages. A Processwire page has whatever fields you want it to have, and that doesn't necessarily mean an HTML content area like a page in Wordpress or other CMSs. It can do, but doesn't have to. A 'Page' could actually be a product with price, weight, description, and image fields. It could equally be a calendar event with start date and time, finish date and time, venue, and description. Processwire Site profiles are a bit like themes, but because of the flexibility of Processwire, they have to define data structures for the page types they're theming a well. I find using a CSS framework like Bootstrap makes it far easier to 'theme' Processwire. You've already got a range of useful components, and it's easy to customise Bootstrap with different colours and fonts, so that way you've got the foundations of a decent looking site without having to be a graphic designer, but with the flexibility that Processwire offers.
    2 points
  14. A client of mine was asking for a solution to send newsletter mails to a list of subscribers. I looked around for a module, but couldn't find any. Then I saw a screenshot on this blog post about UIKit update, and decided to recreate it. Huge thanks to @ryan for the inspiration. The module uses regular pages for building HTML content. These pages can be used to create a fallback link in emails (i.e. "Use this link if you can't view email properly"). During render it injects $page->mailerMode, which can be used to change page output between text and HTML, or to show a simplified, email only HTML output. Screenshots: Main screen is just a list of items. Create page: Module configuration page: During installation, module creates a page under admin for storing items similar to FieldtypeRepeater. It also creates some fields for storing mail info Todo: More testing Sending in batches (with a script that runs in background and real-time progress log) Plans: Integration with Mailchimp (for subscriber lists) Automation (as a separate module for creating email content pages) I'm hoping to complete and release the module in the following days. I think these features should be enough for the beginning, but I'm open to suggestions.
    1 point
  15. You'd also want to think about memory usage/limits. If someone uploads a 10000-pixel-wide image and you go to resize it for use in your template you could run out of memory. This was one of the reasons for introducing the client-side image resizing which is linked to the max-width/max-height settings.
    1 point
  16. Cool stuff! But in the example you would definitely want that template check at the top of the hook (or check the current process with $this->process) or you will get an error when creating or editing a user (no Settings tab exists).
    1 point
  17. I think this default behaviour is totally wrong - $config->adminEmail should not be used as the fallback "from" address by WireMail. I opened a LoginRegister issue and core feature request.
    1 point
  18. That's made me think - I could set up a generic domain, like Campaign Monitor use createsend.com, and send all emails from that. May do that if I need the emails to be more anonymous for any reason ?
    1 point
  19. I've no experience with Sendgrid but just in case helpful, I used to use Mandril until they changed their pricing model from reasonable to insane (for small users), at that time I went with Postmark https://postmarkapp.com/ and have had a faultless experience with them for over year over multiple sites (I'm not on a commission ;))
    1 point
  20. Thanks for the suggestion! Again, all of the help here is appreciated. Have a wonderful day!
    1 point
  21. Thanks to a pointer from Adrian, I just found this thread. Want to cross-reference this post here. There are a few possible ways of handling this and I'd like to work on the issue after I finish my current client work.
    1 point
  22. I forgot about the max and min dimensions I defined for that imagefield. Would be nice, if there was a message "Not in image dimensions" or such. I removed the min and max from the field and it worked for me.
    1 point
  23. I do not want to kill the fun but hasn't it gone off topic a bit too much?
    1 point
  24. Without touching rewrites or anything: <?php namespace ProcessWire; if ($input->url === '/ads.txt') { $file = $config->paths->templates . 'ads.txt'; if (file_exists($file)) { readfile($file); exit; } } Put this in site/init.php (create if it doesn't exists) If you want to force download, use this one instead if ($input->url === '/ads.txt') { $file = $config->paths->templates . 'ads.txt'; if (file_exists($file)) $files->send($file); }
    1 point
  25. Ok, the Lazy.Cron.cache was guilty it's working fine now, thank you @abdus! you just have to put: enddate<now for the closables --- startdate<now, enddate>now for the openables wire()->addHookAfter('LazyCron::every30Minutes', function (HookEvent $e) { $closables = $e->pages->find("closed=0, enddate<now"); foreach ($closables as $p) $p->setAndSave('closed', 1); $openables = $e->pages->find("closed=1, startdate<now, enddate>now"); foreach ($openables as $p) $p->setAndSave('closed', 0); });
    1 point
  26. Can you give more details? A screenshot?
    1 point
  27. Just in case you still have a minute, have you tried deleting the FileCompiler cache and clearing your PW cookies in the browser?
    1 point
  28. You need to supply a Page object as an argument to Pageimages(). For example: $page->carouselImages = new \ProcessWire\Pageimages($page); Seems like an unusual way to build a carousel though - are you using some kind of template/view separation? If not, you don't need to add the carousel images as a property of $page - you can just get your carousel pages and build the carousel markup from them directly. $carouselPages = $pages->get("name=categories")->children("headerImage!=''"); foreach($carouselPages as $carouselPage) { // output your carousel markup using $carouselPage->headerImage }
    1 point
  29. @horst Can you tell me how/where in the module this hijacks/extends wireMail()? I'm glad that it does, but I am desperate to understand how this works. new WireMail(); // WireMail new wireMail(); // WireMail wireMail(); // WireMailSmtp $mail->new(); // WireMailSmtp This has highlighted one of the many parts of my PW knowledge that is majorly lacking. Edit: Ok. Finally get it. Here's how it works, for anybody else that wonders... wire/core/boot.php loads JUST WireMailTools. WireMailTools::new() looks for any classes that overlay on WireMail. If WireMailSmtp is installed, it will be the class that is returned. If none are found, it defaults to WireMail. Shooooo-wee. Nice to know!
    1 point
  30. Well, for me it's much faster than VSCode. Admittedly, it starts off a bit slow but after indexing is complete (~5-6 seconds), you shouldn't have any noticeable delays. I can work on multiple projects simultaneously without any lag (on XPS 13 2016, i5 6200U, 8GB RAM, EVO 850 500GB SSD). It performs code analysis and syntax highlighting lazily so having many files open wouldn't affect the performance that much. But having said that, you can disable language injections or enable battery saving mode to disable most power hungry features. But many of these features are what makes PHPStorm great, so don't cripple it down to a regular editor. https://stackoverflow.com/questions/23842924/phpstorm-7-very-slow-and-sluggish-on-netbook-optimize-ide-for-responsiveness Also, it seems mostly mac users are experiencing this problem
    1 point
  31. LazyCron hooks fire after PW finishes serving the request, so logging inside the hook will not work. Try setting random values to see if changes anything. wire()->addHookAfter('LazyCron::every30Seconds', function (HookEvent $e) { $test = $e->pages->get(1); $test->setAndSave([ 'footerhide' => mt_rand(0, 1), 'meta_desc' => '123' . time() ]); }); If that doesnt work, try deleting site/assets/cache/LazyCron.cache
    1 point
  32. Hey @kongondo - I am actually just playing around with VSCode right now and autocompletion for PW seems weird. Some of the wire functions outside of class scope show up, eg: but that's not all of them, and nothing in any of the PW classes shows up at all. VSCode seemed to index my entire project folder, so I think it should have everything. Any tips you have discovered for this? PS @abdus - I took a quick looks at PHPStorm, but it seemed really sluggish (even after indexing had finished) - did you do any tweaks to get it snappy enough to work with?
    1 point
  33. Install LazyCron (core module) and add a hook for a certain time period, say LazyCron::everyHour. Something like this should work: wire()->addHookAfter('LazyCron::everyHour', function (HookEvent $e) { $closables = $e->pages->find('closed=0, enddate>now'); foreach ($closables as $p) $p->setAndSave('closed', 1); $openables = $e->pages->find('closed=1, startdate>now, enddate<now'); foreach ($openables as $p) $p->setAndSave('closed', 0); });
    1 point
  34. I recently switched to VSCode from Sublime Text and I haven't looked back since. Was hoping to make a demo of how I'm using it in my development...but haven't got the time...yet. I'm getting intellisense, step-by-step debugging (including CSS debugging!), terminal, grep, diff checker, push to Github, JS/HTML/CSS/PHP documentation, phpDocs, etc...the works!
    1 point
  35. Ok, this was a very weird problem. It turns out that when submitting a form with JS, value of the submit button isn't posted with the form, that's why if ($input->post->submitForm) wasn't working as it would normally. We've solved the problem by checking for another field, `stripeToken`, to ensure that the form has been posted properly before processing the credit card. https://stackoverflow.com/questions/1709301/javascript-submit-does-not-include-submit-button-value Another way to solve this problem would be listening to submit button click instead of form submit, then preventing default action, validating the form with Stripe, and actually triggering click on the button.
    1 point
  36. Here's the simplified version of your JS. One thing you should look out for is that inside your form submit handler, you were preventing default submit action, but then submitting again without removing the handler, which caused the same routine to run repeatedly (submit? can't -> validate -> submit -> can't ,,, repeat). When the form validates and you're ready to submit, remove the handler (that prevents the default action), so that the form can submit properly. // Stripe API var stripe = Stripe('pk_test_*****************'); var elements = stripe.elements(); // DOM Elements var form = document.getElementById('payment-form'); var displayError = document.getElementById('card-errors'); // Card style var style = { base: { fontSize: '16px', lineHeight: '24px' } }; // Create an instance of the card Element // Add an instance of the card Element into the `card-element` <div> var card = elements.create('card', {style: style}); card.mount('#card-number'); card.addEventListener('change', function (event) { if (event.error) showError(event.error.message); else showError(); // remove previous error }); form.addEventListener('submit', handleSubmit); function handleSubmit(event) { event.preventDefault(); stripe.createToken(card).then(function (result) { if (result.error) { return showError(result.error.message); } // remove previous errors showError(); // Send the token to your server injectToken(result.token.id); // prevent infinite loop form.removeEventListener('submit', handleSubmit); // send the form form.submit(); }); } function injectToken(tokenId) { // Insert the token ID into the form so it gets submitted to the server var tokenInput = document.createElement('input'); tokenInput.type = 'hidden'; tokenInput.name = 'stripeToken'; tokenInput.value = tokenId; form.appendChild(tokenInput); } function showError(errorMessage) { // if error is not given, remove previous error errorMessage = errorMessage || ''; displayError.textContent = errorMessage; }
    1 point
  37. 1. You have two forms nested inside each other. 2. Here's a revised and simplified version: <?php namespace ProcessWire; // create a new form field (also field wrapper) /** @var $form InputfieldForm */ $form = $modules->InputfieldForm; $form->action = "./"; $form->attr("id+name", 'payment-form'); $form->addClass('pusher'); // $form->method = "post"; // default value // add a single field quickly $form->add([ 'type' => 'text', // type is Inputfield<Type> without `Inputfield` 'id+name' => 'name', 'placeholder' => 'Full Name', 'required' => 1, ]); // add multiple fields quickly $form->importArray([ [ 'type' => 'email', 'id+name' => 'email', 'placeholder' => 'Email', 'required' => 1, ], [ 'type' => 'submit', 'id+name' => 'submitForm', 'class' => 'cta white', 'value' => 'Submit Form', // apparently value becomes the button label ], [ 'type' => 'markup', // add custom markup 'value' => '<div id="card-number"></div> <div id="card-errors"></div>' ] ]); // CSRF token field is added by default // Process input if ($input->post->submitForm) { $form->processInput($input->post); if (!count($form->getErrors())) { // process credit card } else { // form has errors, append errors to the form $errors = join('<br>', $form->getErrors()); $form->add([ 'type' => 'markup', 'value' => '<div id="form-errors">$errors</div>' ]); echo $form->render(); } } else { // not posted, show the form echo $form->render(); }
    1 point
  38. Have you seen this https://ide.atom.io/ ?
    1 point
  39. The thing with processwire, if you are a none coder and coming from systems like modx, wordpress, drupal, etc. your familiar way of approaching things won't work anymore. You have to invest time to get rid of old habits. Nothing comes out of the box with processwire. But that is the great thing about it. No longer searching for "the" cms that has it all, but a way that let's you do it all - processwire. But one thing is true also, experienced coders have great advantage with processwire compared with none coders.
    1 point
  40. @monchu, thanks for the reply. It's not quite what I'm asking about - it's the default sort order I'm interested in and why a new page would be inserted in the middle of existing pages. I did manage to figure some stuff out... Firstly, it seems the 404 page, Admin and Trash are always sorted last. There's no changing that, which is fine. Also, looking at the "sort" column of the "pages" table in the DB it looks like there were gaps in the sequence of sort values of pages under Home. Because of those gaps and also the fact that some of the pages that are part of my site profile happened to have high sort values, new pages were being inserted above them in the tree. So I fixed the gaps with... $home = $pages->get('/'); $pages->sort($home, true); // re-build sort values for children of $home, removing duplicates and gaps ...and then I manually gave high sort values to any pages that I want to keep at the bottom of the tree (but still above 404, Admin, etc, as per the above)... $p = $pages(1016); // the Form Builder page $pages->sort($p, 99); // set the sort value to a high number Now new pages are going just where I want them.
    1 point
  41. https://www.baumrock.com/portfolio/event-voting-tool-social-impact-award/ Another nice little Showcase of what can quickly be done with Processwire I sponsored this voting tool for the Austrian Social Impact Award ceremony (https://socialimpactaward.net/) helping them to pick the winner of the audience voting. The site is based on the default UIKIT theme (obviously) and i basically just placed the logo + changed the colors. The site structure is also very simple, having only one parent to store all teams, one parent to store all votes and one page to show the results (to the admins): The Projects-Template stores some informations of the project and the vote-count: All the votings are single pages as well having only one checkbox, ensuring that every code can only vote once (every visitor got one code at the entrance): Votes are created via Tracy Console as easy as that: The hook that creates the passwords is also simple: /** * create unique code for voting */ $wire->addHookAfter('Pages::saveReady', function($event) { $page = $event->arguments(0); if($page->template != 'vote') return; if(!$page->title) { $rand = ''; while(!$rand OR pages("title=$rand")->count() > 0) $rand = randomPassword(); $page->title = $page->name = $rand; } }); And finally the check if the vote for this code is already done (inside the vote-template). the whole vote-template is as simple as that (thanks to the awesomeness of markup regions and functionsapi): <?php namespace ProcessWire; // handle votes (url segments) if($id = $sanitizer->int($input->urlSegment1)) { // if voting is locked redirect to thankyou message if($page->votingdone) $session->redirect($page->url); // else set voting $team = pages($id); if($team->id) { // increase voting for this team $team->setAndSave('votes', $team->votes+1); // lock this votings page $page->setAndSave('votingdone', 1); } } ?> <?php // if voting is done show thank you and lock page if($page->votingdone): ?> <region id="main"> <div class="uk-card uk-card-primary uk-card-body uk-width-1-1 uk-margin-small-top uk-text-center uk-border-rounded"> <h3 class="uk-card-title">Danke für Ihre Teilnahme!</h3> </div> </region> <?php return; endif; ?> <region id="main"> <div class="uk-text-center uk-margin-top"><?= $page->parent->body ?></div> <?php foreach(pages('template=team, sort=random') as $team): ?> <div class="uk-card uk-card-default uk-card-body uk-width-1-1 uk-margin-small-top uk-border-rounded"> <h3 class="uk-card-title uk-text-center"><?= $team->title ?></h3> <ul uk-accordion="collapsible: true"> <li> <p class="uk-accordion-title uk-text-center"><span uk-icon="icon: chevron-down"></span> Beschreibung anzeigen</p> <div class="uk-accordion-content"> <?= $team->body ?> </div> </li> </ul> <a href="<?= $team->id ?>" class="uk-button uk-button-large uk-button-primary uk-width-1-1 uk-border-rounded">Für dieses Projekt abstimmen</a> </div> <?php endforeach; ?> </region> I'm still impressed by ProcessWire and how much can be achieved with how little effort
    1 point
  42. FWIW, I respectfully disagree. For a lot of sites, it just isn't required. Maintainers can log in through the admin and a whole host of sites just don't need front end user management. It always struck me as silly that some other CMSs always have (had?) a visible login link on every page. If it's a concern that it might be a harder sell to clients that this isn't part of PW core, then surely the fact that Ryan is the developer should confirm that this is effectively 'part of PW', just not installed by default. As far as security goes, and misjudged editing of modules vs core files, there will always be people who go fiddling about in /wire/ when they shouldn't, so this functionality living in there won't necessarily help.
    1 point
  43. Here are my generic versions WireArray::map wire()->addHookMethod('WireArray::map', function (HookEvent $e) { $func = $e->arguments(0); if (!is_callable($func)) throw new WireException('first argument must be a callable function'); $mapped = array_map($func, $e->object->getArray()); $e->return = $mapped; }); WireArray::reduce wire()->addHookMethod('WireArray::reduce', function (HookEvent $e) { $func = $e->arguments(0); $initial = $e->arguments(1) ?? []; if (!is_callable($func)) throw new WireException('first argument must be a callable function'); $reduced = array_reduce($e->object->getArray(), $func, $initial); $e->return = $reduced; }); WireArray::forEach wire()->addHookMethod('WireArray::forEach', function (HookEvent $e) { $func = $e->arguments(0); if (!is_callable($func)) throw new WireException('first argument must be a callable function'); $foreached = []; foreach ($e->object as $i => $item) $foreached[] = $func($item, $i); $e->return = $foreached; }); Tests $mapped = $pages->find('id>0, parent=2')->map(function($page) { return [ 'title' => $page->title, 'id' => $page->id ]; }); $reduced = $pages->find('template=post')->reduce(function($carry, $item){ $carry[] = $item->id; return $carry; }, []); $foreached = $pages->find('template=post')->forEach(function($item){ echo $item->id . '<br>'; }); dump($mapped); dump($reduced); dump($foreached); Which outputs array (4) 0 => array (2) title => "Pages" (5) id => 3 1 => array (2) title => "Setup" (5) id => 22 2 => array (2) title => "Modules" (7) id => 21 3 => array (2) title => "Access" (6) id => 28 array (8) 0 => 1024 1 => 1026 2 => 1028 3 => 1031 4 => 1033 5 => 1058 6 => 1062 7 => 1065 1024 1026 1028 1031 1033 1058 1062 1065 array (8) 0 => null 1 => null 2 => null 3 => null 4 => null 5 => null 6 => null 7 => null 29.59ms, 0.06 MB
    1 point
  44. what about this? <?php $allTitles = $yourPageArray->each('title'); // or if it was more complex $allTitles = $yourPageArray->each(function($page) { return "{$page->forename} {$page->surname}"; } you can also add your own methods via hooks: $wire->addHookMethod('WireArray::test', function($event) { $arr = $event->object; $out = []; foreach($arr as $item) $out[] = 'testing page ' . $item->id; $event->return = $out; });
    1 point
  45. Hey Margie. Hope you can convince them to use PW. Sorry for the long contribution, but I hope I'm giving you a good argument. I've had a similar discussion a while back when I was "selling" PW to one of the main shopping centre chains here in Portugal (dolcevitatejo.pt is one of these sites, made in PW). They wanted an OS CMS and were leaning towards Wordpress, and I managed to convince them. My main argument was security. Check out this article: https://www.notanotherdotcom.com/blog/a-better-cms-part-1-security/ PW is inherently closed, with no plugins that conflict with one another or reveal publicly known vulnerabilities that can be exploited. The big three are regularly targeted just because they're popular. Also, check out this security log for PW (you'll have to register first): https://secuniaresearch.flexerasoftware.com/community/advisories/search/?search=processwire ... then search Wordpress, Drupal, Joomla, whatever you want. Processwire : 0 (zero) incidents, EVER! Wordpress : 17 incidents in 2017 Drupal : 4 incidents in 2017 Joomla : 4 incidents in 2017 These include: Cross-Site Scripting Vulnerabilities SQL Injection Vulnerabilities Security Bypass Vulnerabilities Local File Inclusion Vulnerabilities All of which are as scary as nature is in Australia. I've never heard of a PW site being compromised since I discovered it 3 years ago. One curiosity I like to point out is something Ryan said somewhere about password recovery on PW's login page. You don't have that installed by default and need to turn it on yourself, because with password recovery on, the CMS's security will only be as high as that of the admin's email.
    1 point
  46. I launched it today: http://fyp.washington.edu/ I can't even begin to explain how excited I am by this software. It feels like I accomplished more in a month than in the last ten years of professional web dev work. Finally, a CMS geared to the needs of content publishing and information modeling (i.e. taxonomy and ontology) -- not news, widgets, or journaling. Like so many others I had been struggling with the Drupal/Wordpress dichotomy. Drupal feels like hitting myself in the head with a hammer and Wordpress is insecure and inflexible. And both their inner workings seem completely opaque, no matter how often I build with them. Enter PW, CMS of my dreams. The FYP site is combined with Zurb's Foundation Framework, which I am similarly enthusiastic about. Also above all jQuery + CSS3, which seem like a never-ending treasure chest of wonders. I did the interface design and development as well as the information architecture and all of the programming. My favorite thing about the site is the way I was able to give it gears that turn with the seasons -- for each season of the year I added tag "pages" and then tailored parts of the interface to match. The homepage image, the default header, and the selection of front page slides are all determined by what time of year it is. I was able to expose almost EVERYTHING to the content stakeholders through the flexible field system. I could totally get run over by a truck tomorrow and all would be well. I LIKE THIS. Maybe some don't. But I've always been in this field in the hopes of empowering people and making room for creativity. ProcessWire works with these goals, not against them. Cheers, Jenn p.s. the slider is RoyalSlider. I dig it too.
    1 point
×
×
  • Create New...