Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/28/2015 in all areas

  1. This methode works for the complete /template/ folder, too....so you could have a whole dev version and change it to live and back if there was problems.... From Diogo's tipps to bookmark: https://processwire.com/talk/topic/2475-quick-tip-for-testing-on-live-website/#entry23571 Best version i see on this topic for me i copy the template folder and rename it to /dev/ and use the snippet from the post above...make a backup of the live templates and copy the dev files...so you can create simple steps. Not that perfect like versioning with git - but for small/medium websites it should be a save methode to test and change things live without a risk. regards mr-fan Edit: Additional there is a great recipe from Raymond on this topic https://processwire-recipes.com/recipes/use-different-sets-of-template-files/
    3 points
  2. You could just ask the template to give you all fields it does posses: $selector = "..." . $template->fields->implode("|", "name") . "*=$string"; If you can specify all field beforehand you could use FieldtypeCache and add all necessary fields to it. After that you can just search the cache field instead of all other fields.
    2 points
  3. Hello, What do you think about this?: https://www.indiegogo.com/projects/turris-omnia-hi-performance-open-source-router#/ https://omnia.turris.cz/en/
    2 points
  4. I'm happy to share the recent re-launch of the website for the Smart City Alliance, an organization that promotes knowledge sharing and collaboration between Alberta municipalities, academic institutions, technology advocacy groups and business. Their previous website was built (oddly) as a Ruby-based application, and I managed to completely rebuild the site (while enhancing both the design and functionality) within a 2.5 week window while handling other projects. View the site: http://smartcityalliance.ca/ - - - - - - Front-End Fanciness: - Fully responsive design - SRCSet for key images Modules in Action: - AIOM+ (All In One Minify) - Hanna Code - Map Marker (Field Type) - Twitter Feed Markup Leverging Processwire: - Powerful use of pagefields (for the tagging system) - Advanced caching rules for all template types - Easily generated a variety of specific RSS feeds
    1 point
  5. https://processwire.com/talk/topic/5513-fieldtype-cache-please-elaborate/
    1 point
  6. For what reason would you want to do that? It sounds terribly inefficient. You want every field for the matching template or every field? (edit: Completely misread your post, sorry) You can also do field1|field2|field3=$string, however if you are absolutely set on every field I think you can do. $f = $fields->find("template=documentHolder"); $results = $pages->find("template=documentHolder, status=hidden, $f=$string"); But I'm not absolutely sure, I'm just guessing here after using ProcessWire for a couple of months. edit: LostKobrakai beat me to it His answer will be correct as he is way better than me at this ProcessWire stuff.
    1 point
  7. When I first started with processwire the php didn't make much sense to me. But like any other language, the more you use it the better you become and the more you see it's potential. Php is driving a huge part of the internet. Just look at the amount of daily job offers where companies are looking for php coders.
    1 point
  8. I was using only LESS in my projects through PhpStorm's LESS plugin. It did the job fine until I wrote a mixin that required LESS version 1.6.2, and the plugin supports 1.6.0 only. So I took the chance and set up Node and Gulp to see the difference. And there's a huge difference! First off, my mixin works fine. Second, I could automatize many things that I did manually beforehand, and even add new things to my workflow. I used Base's gulpfile.js as the starting point but added some new stuff too. - watch: compile CSS when a LESS file is changed (saved) - less: compile LESS to CSS - uncss: remove unused CSS from stylesheets. Great to reduce CSS file size when using bigger CSS frameworks. - minify, nano: minify JS/CSS/HTML - imagemin: reduce image file size - copy: create a release package out of source files - inlinesource: add CSS inline These tasks helped a lot to achieve 100/100 on google page speed on a current project (one-page landing page). It takes some time to set up gulpfile.js but when it's done, subsequent runs saves a lot of time. I'm on Win and had some initial troubles setting up PATHs (environment variables), but finally everything came into place. I also use Node.js Portable Runtime so I can use Node in a portable manner without the need to install globally.
    1 point
  9. @Horst great explanation and a convincing concept. Thanks for sharing!
    1 point
  10. Hi @totoff, it depends on what tasks I want apply to a site. If it only rely on template files, css and js files, I switch from regular to dev-files. Means, I use a little abstraction layer for including my files like this: $myMainJSfile = "scripts/main.js"; $myMainCSSfile = "styles/main.css"; When working on a live site, I use something like this: if($user->isSuperuser()) { $config->debug = true; $myMainJSfile = "scripts/main.dev.js"; $myMainCSSfile = "styles/main.dev.css"; } else { $myMainJSfile = "scripts/main.js"; $myMainCSSfile = "styles/main.css"; } When working on templatefiles, I put in the top of the template file a few lines of code: if($user->isSuperuser()) { include("./nameOfMyTemplateFile.dev.php"); return; } This switches to a dev version of the template file and returns directly after including it. (The code of the original isn't executed). This is a basic description. Depending on how you have organized your site, there is a lot room for improvements, go into depth, make it a more granular system. But you get the idea. If I need to alter the DB too, I use a separate site/config.dev.php too. YOu can read about it here, scroll down to the end: "Maintaining a separate development configuration file". (I duplicate the DB to a dev-version and connect to it for development)
    1 point
  11. You need to save the page first, then add the files, then save again (see example here)...So, are you sure the files are not getting uploaded or you are removing them (the code after ....// remove all tmp files uploaded) after saving the page?
    1 point
  12. 1 point
  13. I noticed that this site was featured on http://weekly.pw/. Thank you everyone who commented with your feedback, it's much appreciated. This made me very happy
    1 point
  14. I still write my CSS without a preprocessor... Is that weird now? I admittedly haven't really tried any of the preprocessors (although I have looked into them), but at this point I prefer to use plain CSS because I can see exactly what code I'm producing and base how I architect my CSS off of that. I'll have to look more into this gulp n' grunt stuff...
    1 point
  15. For me this was a goal, too since my former cms works with pages _and_ blocks on that pages very simple so i've searched for a simple solution with PW on this topic. You could take a look at the Blue VR Site Profile it's a great place to learn how to build variable content und flexible global blocks with repeaters, pages and pagefields... https://processwire.com/talk/topic/6647-blue-vr-processwire-site-profile/ second important "block builder" is PageTableExtended module....with this you could create different templates and let the user choose what kind of content he needs next...and resort them in the backend with the extended version you could render the output in the backend to fit the frontend view better. https://processwire.com/talk/topic/7459-module-pagetableextended/ since it is a little bit hard to setup the first time this post may help a lot: https://processwire.com/talk/topic/7459-module-pagetableextended/#entry71972 third thing to look is this module that let the user choose a template file to render the output...my this could be exented with some kind of previewimage like shown in your post.. https://processwire.com/talk/topic/6377-fieldtypeselectfile-inputfieldselectfile/ options are all there, but nothing out of the box i think. i'm very comfortable with pagetableextended on such things...combined with some optionfields it is quit powerful. regards mr-fan
    1 point
  16. 1 point
  17. 404 pages serve an important purpose from an SEO standpoint. So if this is a public facing site, I'd recommend maintaining a proper 404 page rather than just redirecting to or displaying the homepage. You could always have your 404 page link to your homepage or even meta redirect to it after a few seconds.
    1 point
  18. @Nik, you are right of course. Already changed it. @Matthew, seems interesting but I really like to keep it simple and adapted to each situations need. What you are asking can be closely achieved by creating a "dev" folder inside the templates folder and copying there your styles and scripts folders. Then, put this line on the top your header.php: if ($user->name == 'me') $config->urls->templates .= "dev/";
    1 point
×
×
  • Create New...