Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/14/2017 in all areas

  1. Once they wrapped their heads around that analogy, we can proceed and explain the PageClone module using this : Kidding aside, I explain these templates to myself in terms of OOP where template = class, fields = members, and pages = objects. But biology is fine, too.
    4 points
  2. Hello, I was reading about biology and maybe ProcessWire Template, Pages and Fields could be explained using Genotypes, Phenotypes and Cells. https://en.wikipedia.org/wiki/Genotype https://en.wikipedia.org/wiki/Phenotype https://en.wikipedia.org/wiki/Cell_(biology) Wikipedia Quotes So by using a wide interpretation of those definitions we could associate Templates = Genotypes (Defines the basic structure) Fields = Phenotypes (Defines what information will be stored an available for querying) Pages = Cells (It's the representation of the Template (Genotype) and Fields (Phenotypes) with the information filled. The basic structural unit for the ProcessWire application.) What do you think?
    2 points
  3. i like it a lot – i think anyone who has a firm grasp on this can really thrive in PW in so many ways...
    2 points
  4. If you want to confuse beginners, why not I push it a bit further: the "simplest" creature which can be said to be alive is a single cell. It IS life. In order to boost the chances of survival cells unite, live and die (disintegrate) "together". The fundamental unit of life, the cell, is alive when it first begins to move against gravity and the path of least resistance.
    2 points
  5. I have used that technique (as described here: https://processwire-recipes.com/recipes/use-different-sets-of-template-files/ ) for developing a whole new frontend while the site was live and then replaced the whole templates directory when the new one was done...
    2 points
  6. I want to port the animated gif module to the new image rendering engine module type. With this it will automatically handle the animated gifs correct. Maybe I can do it this week / weekend.
    2 points
  7. Image rendering engines are always used together / in parallel. Or, in other words, the GD engine cannot be disabled, it is always on as a fallback or last standing man. The image rendering procedure in short: image inspector extract all relevant infos about image type, subtypes, optional layers, etc, and give back a descripting paramvalue according to the return of image inspector, all available rendering engines get "asked" in hirarchical order if they can handle this type of fileformat / subformat the first that matches will get the job and as an additional fallback, if it somehow made a false promise and failed with the rendering, the image will be handed over to GD engine (or the next in hirarchy) Lots of stuff under the hood! ----- To your question: I think it is fine to keep the default values in site/config (together with the missing param for what overrides what). But when enabling an additional rendering engine, you are already in the configscreen and can set the "optional" default settings there.
    2 points
  8. Yesterday we (Peter & Paul) launched two websites, Noiascape & Factory. Both a labour of absolute love. We are extremely proud of these and even more proud that our clients share our love for ProcessWire. Thanks for all your great work Ryan! Noiascape An architectural company based in London, Teatum & Teatum, came to us asking for a very different website promoting their unnamed development practice. Teatum & Teatum's creativity influences their buildings, we wanted to capture that in the name, brand & website we created. The name we came up with was Noia/Scape. Noia means new thinking, new approach and new direction. Scape means space, landscape, communities and places. http://www.noiascape.com Factory A multi-award winning sound design and audio facility in London, worked with us to come up with a creative idea to celebrate their 20th Anniversary. The original idea to reskin their website, turned into a rebuild using ProcessWire due to the massive improvement that ProcessWire could bring. Both to the front-end and the back-end. Factory are extremely happy with ProcessWire and are really glad they made the switch. It's always exciting when clients share our passion for ProcessWire. The main piece of work was to create art from sound and use this for a timeline of Factory's history. http://factory.uk.com Thanks Ryan & Community for all your great work and allowing front-end developers such as myself feel limitless when creating websites.
    2 points
  9. i keep everything for the front end in the templates folder, since a lot of modules and such use the templates directory as the assumed location of the fonts, js, css files... i tried a long time ago to keep some things outside of templates, but it didn't really help and was somewhat annoying to deal with... i can't see any reason why templates folder can't hold everything, plus then you can use alternate template folder setup for testing and development (like templates-dev)... and have a completely separate independent copy of all those things
    2 points
  10. I've added Robin's code to AOS (unreleased yet) with some tweaks (use placeholder search character instead ::before pseudo, on enter select first match and do not submit the form, focus on expanding the icons and position the filter next to the Show all button instead floating. I've also posted a PR to the core InputfieldIcon.
    2 points
  11. I had a need to do this and there were some requests in the Table forum so... LimitTable A module for ProcessWire CMS/CMF. Allows limits and restrictions to be placed on selected Profields Table fields. For any Table field you can limit the number of rows that may be added and also prevent the use of drag-sorting and the trashing of rows. If a limit has been defined then there is an option to show all (empty) rows up to that limit. This module does not support paginated Table fields. Usage Install the LimitTable module. The module configuration screen should be self-explanatory. You can add rows in the module config as needed using the "Add another row" button. Please note that limits and restrictions are applied with CSS/JS so should not be considered tamper-proof. Module config: The effect of the above config in Page Edit. The empty rows up to the limit are shown because "Show all rows" is checked. https://github.com/Toutouwai/LimitTable https://processwire.com/modules/limit-table/
    1 point
  12. Also, you can use @adrian's Tracy Debugger module to use different template files temporarily: https://processwire.com/blog/posts/introducing-tracy-debugger/#template-path-panel
    1 point
  13. Hi @Karl_T, There need to be made more changes since there I believe that are different arguments in the different hooks (see and see). It is unfortunately not as easy as changing hooks.
    1 point
  14. @cjx2240 here's my 2cents: - for those configurable pages, i use a pagetable, in combination with the Micro Contexts module... this allows me to have 1 template for all of those items but to hide/show fields and change their order, descriptions, labels, notes and even conditional hide/show based on the 'type' of widget (e.g. section). this is working really well for me because on 'turn-key' site, you never know how many custom sections you will need to build, and it would be a drag to have to keep creating new templates; in this system you just need to add each section as an option (e.g. page reference for the section type) and then load the corresponding file using some code like this: if(count($page->sections_pt)) { $sections = ''; foreach($page->sections_pt as $section) { if(file_exists('./partials/sections/section-' . $section->widget_type->name . '.php')) { $viewBag['widget'] = $section; $sections .= "\n" . wireRenderFile('./partials/sections/section-' . $section->widget_type->name, $viewBag); } } $content = $sections; }
    1 point
  15. Like @Falk and @Macrura I sometimes have the same, forever-spinning loading behavior, especially with images that are at least larger than 3000 pixels.
    1 point
  16. @alexcapes, are you looking for a solution that would allow non-superusers to restore accidentally trashed PageTable pages? Or is it just an occasional mistake that a superuser needs to fix on request? If it's just the latter you could restore the pages from the trash and use Version Control or Changelog to put the PageTable field back how it was before the deletion.
    1 point
  17. I think it is some sort of bug. But not that way you would think first, I believe: It is a feature that is/should be configurable, but the User-Interface is missing. Explanation: With multiple, different render engines, we need different quality settings for them. Per default, the module settings overwrite the configsetting, but it should be configurable to disable this. For example in CroppableImage it is configurable: But for regular (GD) image rendering there is no module config screen. Maybe we need to add a new param for this to the $config->imageSizerOptions like "useEngineQualitysettings", per default = true. Let's ping @ryan!
    1 point
  18. Limit Table works by hiding elements within the inputfield in Page Edit. You can make a custom solution for Repeater Matrix (or any inputfield) by using your browser tools to find the class/ID of the elements you want to remove, and hiding them with a display:none CSS rule. Add the custom styles selectively to Page Edit via a hook: $wire->addHookAfter('ProcessPageEdit::execute', function(HookEvent $event) { $page = $event->object->getPage(); $out = $event->return; // match to the relevant page(s) however suits you if($page->template->name == 'my-template') { $out .= " <style> /* Put your custom CSS here */ </style> "; $event->return = $out; } });
    1 point
  19. Your second use of if($prod->images) echo " is unnecessary (since you get only to this point if the condition is true). You could replace this by if($image) echo" Edit: Like in the code you cited first...
    1 point
  20. 1 point
  21. Just named the matrix field because for put data from local to web this feature is a great one on this fieldtype: Yes you should create some PHP that renders the needed data for the javascript, or provide the data as JSON...many options again. regards mr-fan
    1 point
  22. It would be possible to get the relationship at the time a page is trashed - for instance, with a PageTable field you could hook InputfieldPageTable::processInput() and get the pages about to be trashed. As for simple it depends on what you're comfortable with. To store the information in a self-contained way your module would need to create and use its own database table. There are existing modules you could look at as an example of how to do this, e.g. Template Access by Parents
    1 point
  23. foreach($posts->getValues() as $index => $post) { $is_large = $index % 6 == 1 || $index % 6 == 2 if($is_large) … else … }
    1 point
  24. Note: this functionality is now built into AdminOnSteroids. I'd hate to know how much accumulated time I have spent and how much eye-strain I have experienced over the last couple of years, hunting through the 675 icons in the "all icons" view for the one I want. Today I finally got around to doing something about it. IconsFilter Allows the "all icons" view in InputfieldIcon to be filtered by name. Usage Install the IconsFilter module. When viewing "all icons" in InputfieldIcon (Advanced tab of field/template settings) you can filter the icons by name using the filter input at top right. https://github.com/Toutouwai/IconsFilter @tpr, something that could be merged into AdminOnSteroids?
    1 point
  25. +1000 to put this in core
    1 point
  26. You could also try something like that: $styles = array("class1", "class2", "class3"); $recipes = $pages->find('your-selector'); foreach($recipes as $key => $recipe){ $class = (isset($styles[$key])) ? $styles[$key] : "default-class"; echo "<div class='$class'><img src='{$recipe->images->first->url}'></div>"; }
    1 point
  27. Interesting to see someone else using PW + Vue.js. Building components in Vue and using things like webpack and hot reloading has been kind of eye opening for me. I've just finished a small website/shop that uses Vue to render some elements. Things like the cart made a lot of sense, calculating/updating prices as quantities are edited for example. The cart in this instance is essentially a popover and doesn't need to be rendered immediately or visible for SEO purposes, which was a primary concern with this site. Where Vue was used to render actual content, I ended up writing duplicate templates in both PHP and using Vue components (the latter overwrites the former) which is obviously not ideal. I'm looking to eventually transition to using Vue/Vuex/Vue Router, moving away from writing PHP based templates and just using PW to expose JSON data via some kind of custom API. But as I almost exclusively build websites and not apps, things like SEO have always been a bit of a concern. I need to read a lot more about how to handle server side rendering with Vue for example. I wonder if there are enough people here who would be interested in some kind of PW/Vue/Webpack project template for use with Vue CLI or similar?
    1 point
  28. I'd strongly suggest you to take a look vue.js instead of react. It's considerably more friendly to beginners, but does still have all the powers react does have (not judging advanced stuff like react native). I personally also feel, that react is more targeted to a "all or nothing" usage (at least in terms of tooling), whereas with vue you can start out just by implementing small components in your site, without the need to change everything from the get-go.
    1 point
  29. This improvement could come handy, for me it comes up regularly. API method to check if image is a default image: would return true if selecting a page instead uploading an image, using the admin "Default value (when empty)" field (eg. "isDefaultValue" or "isPlaceholder"). Currently I have to check for a file name ("no-image.png"), obviously not the best way.
    1 point
  30. "this request was aborted because it appears to be forged" message is also shown when try to login and cookies are disabled. (Somewhat confusing, better to get a message to enable cookies before tying to login)
    1 point
  31. Ah, you just need to edit your news template settings, urls tab and allow url segments.
    1 point
×
×
  • Create New...