Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/02/2017 in all areas

  1. Hi @valan, you need something like this? $selector1 = "template=basic-page"; $selector2 = "status=123"; $mergedSelectors = $this->wire(new Selectors($selector1)); $mergedSelectors->add($this->wire(new Selectors($selector2))); // Updated see comment valan // to output a PageArray echo $this->wire('pages')->find($mergedSelectors); // or to output the selector as string echo $mergedSelectors->__toString(); // See: /wire/core/Selectors.php
    4 points
  2. Ryan has a habit of developing features we didn't even know we needed!
    4 points
  3. Hello @valan, maybe this could be helpful for you: New: selectors as associative arrays New: selectors as regular arrays This way you have more freedom, what you want to pass as selector. Regards, Andreas
    2 points
  4. Variations Released 29 May 2017 Variations is a simple yet powerful commercial ProcessWire module that allows website editors to create attributes and their values and from those generate variations of any entity, most notably products. The module consists of FieldtypeVariations and InputfieldVariations as well as a ProcessVariations for managing variations configurations and attributes. Setting up the field is quite easy. First, create a field of type Variations. Define some custom inputs that will need to be directly edited on the page containing the field, for instance a product price, SKU, etc. Secondly, via the Inputfield, create a couple of attributes. Thirdly, create a variations configuration and add the attributes and values you want in the configuration. Link that variations configuration to your page and the module will automatically generate all possible combinations (variations) of the attribute values in that configuration. These, together with the custom inputs you created when setting up the field will be displayed on the page (e.g. a product page), ready for editing. This makes this module quite unique; variations are defined at the page-level rather than at the field level. This presents lots of possibilities such as infinitely reusable attributes and variations configurations. For those using Padloper, integration with the e-commerce platform is quite simple as demonstrated in this tutorial. The module consists of 4 modules ProcessVariations FieldtypeVariations InputfieldVariations VariationsCustomTableManager (autoload module, working behind the scenes) Video Demo: https://youtu.be/T93nn96UL8o Documentation: https://variations.kongondo.com/ Shop: https://processwireshop.pw/plugins/variations/ Requires: ProcessWire 2.5 or newer Features Easily create variations of anything, including products for e-commerce websites, etc Create an attribute once, use it everywhere, multiple times, picking and choosing all or only the attribute values you want Bulk editing of variations configurations and attributes Reusable variations configurations Works with Padloper out-of-the-box with minimal coding User-friendly, intuitive and easy to set up
    1 point
  5. I tested and cannot reproduce. For published pages, editing and saving a page updates the modified timestamp but not the published timestamp. But for news pages I think it is more typical to add a datetime field to the template to serve as the posting date, so the user can change the date to suit. For instance, to set a future posting date and then in your news selector you exclude pages with posting date greater than today.
    1 point
  6. But you have a page named category, which is the same as the urlsegment you want to use, don't know how PW handles that exactly. If you wanna share the code (site profile) i can take a look.
    1 point
  7. So you have a category page. $segment1 = $input->urlSegment1; $segment1 = $input->urlSegment2; echo $segment1; echo $segment2; You assign both segments to the same variable $segment1, but you echo $segment1 and $segment2. Since you have a page with the name "category" i assume you are on that page. In this case your first segment is not a segment but a page and your 2nd segment is actually your first. So $segment1 points to $input->urlSegment2, which doesn't exist, and $segment2 is not defined/null/empty.
    1 point
  8. Do it outside the if statement and without sanitizing them.
    1 point
  9. @MilenKo Just echo the segment and see if it has any value.
    1 point
  10. Hello @MilenKo, first of all I noticed that you search for a pageName value in a title field. When you want to search a pageName I think you should search in the name value: name=$name Second you are talking about the template category-list and searching for categories-list. I hope this is just a typo, but if not you should correct this. I would suggest you to dump everything step by step for example with TracyDebugger to get to the collection of pages you are looking for. Regards, Andreas
    1 point
  11. Something (someone?) must have changed your site I guess. Loosing all passwords and at the same time you have a site that "somehow" changed? Do you have a backup? BTW, more troubleshooting tips can be found here, for example: https://processwire.com/docs/tutorials/troubleshooting-guide/page2 https://processwire.com/docs/install/troubleshooting/#general-troubleshooting-upgrade-tips
    1 point
  12. Howdy @jen, and welcome to the forums. First, you can use this RESET to gain access to the admin page. Then we can proceed from there.
    1 point
  13. I'm using https://buddy.works/, but this might not be the best place to discuss CI options
    1 point
  14. The new ProField sounds amazing! Just what i did not dream of, but would dream of if I could imagine it earlier) I can see my frontpage templates getting sooo much simpler. I am really happy (again) I got my ProFields subscription .
    1 point
  15. After convincing my main client/boss of the advantages of PW over WP, I'm currently build his personal/company site new version. He's a Project Management expert and currently works for the United Nations. His website received around 2k unique visitors per day. Running WP on a Digital Ocean 4GB droplet with Varnish and Apache on Ubuntu 14. MySQL DB runs on another droplet with 2GB. There are other apps running on the same 4G server. I'm planning to use Laravel's Forge to admin the new version. It will make things easier I think. This new version will merge two websites, ricardo-vargas.com and macrosolutions.com.br (the company services). I'm posting the screenshots for the template and admin pages of a consulting service that today leaves at: http://macrosolutions.com.br/consulting/projects-offices-assessment-optimization-and-restructing/ on the old site. There's no front-end yet but I reckon posting these screens may help someone. Numbers: 43 Fields organized in 4 tabs.
    1 point
  16. Heythere, to run the XML sitemap module from pete you'll have to add 3 more lines to your config: location = /sitemap.xml { try_files $uri $uri/ /index.php?it=$uri&$args; } Otherwise you'll get an 404 error. Cheers from austria!
    1 point
  17. Hey all, I've converted the ProcessWire 2.3 rules to Nginx. Hope this will help some people Greetings, Niek server { listen 80; listen 443 ssl; root /var/www/example.com/public_html; server_name example.com www.example.com; ssl_certificate /etc/pki/tls/certs/example.com.crt; ssl_certificate_key /etc/pki/tls/private/example.com.key; client_max_body_size 50m; access_log /var/www/example.com/_logs/access.log; error_log /var/www/example.com/_logs/error.log; # ----------------------------------------------------------------------------------------------- # Set default directory index files # ----------------------------------------------------------------------------------------------- index index.php index.html index.htm; # ----------------------------------------------------------------------------------------------- # Optional: Redirect users to the 'www.' version of the site (uncomment to enable). # For example: http://processwire.com/ would be redirected to http://www.processwire.com/ # ----------------------------------------------------------------------------------------------- if ($host !~* ^www\.) { rewrite ^(.*)$ $scheme://www.$host$1 permanent; } # ----------------------------------------------------------------------------------------------- # Access Restrictions: Protect ProcessWire system files # ----------------------------------------------------------------------------------------------- # Block access to ProcessWire system files location ~ \.(inc|info|module|sh|sql)$ { deny all; } # Block access to any file or directory that begins with a period location ~ /\. { deny all; } # Block access to protected assets directories location ~ ^/(site|site-[^/]+)/assets/(cache|logs|backups|sessions|config|install|tmp)($|/.*$) { deny all; } # Block acceess to the /site/install/ directory location ~ ^/(site|site-[^/]+)/install($|/.*$) { deny all; } # Block dirs in /site/assets/ dirs that start with a hyphen location ~ ^/(site|site-[^/]+)/assets.*/-.+/.* { deny all; } # Block access to /wire/config.php, /site/config.php, /site/config-dev.php, and /wire/index.config.php location ~ ^/(wire|site|site-[^/]+)/(config|index\.config|config-dev)\.php$ { deny all; } # Block access to any PHP-based files in /templates-admin/ location ~ ^/(wire|site|site-[^/]+)/templates-admin($|/|/.*\.(php|html?|tpl|inc))$ { deny all; } # Block access to any PHP or markup files in /site/templates/ location ~ ^/(site|site-[^/]+)/templates($|/|/.*\.(php|html?|tpl|inc))$ { deny all; } # Block access to any PHP files in /site/assets/ location ~ ^/(site|site-[^/]+)/assets($|/|/.*\.php)$ { deny all; } # Block access to any PHP files in core or core module directories location ~ ^/wire/(core|modules)/.*\.(php|inc|tpl|module)$ { deny all; } # Block access to any PHP files in /site/modules/ location ~ ^/(site|site-[^/]+)/modules/.*\.(php|inc|tpl|module)$ { deny all; } # Block access to any software identifying txt files location ~ ^/(COPYRIGHT|INSTALL|README|htaccess)\.(txt|md)$ { deny all; } # Block all http access to the default/uninstalled site-default directory location ~ ^/site-default/ { deny all; } # ----------------------------------------------------------------------------------------------- # If the request is for a static file, then set expires header and disable logging. # Give control to ProcessWire if the requested file or directory is non-existing. # ----------------------------------------------------------------------------------------------- location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|eot|woff|ttf)$ { expires 24h; log_not_found off; access_log off; try_files $uri $uri/ /index.php?it=$uri&$args; } # ----------------------------------------------------------------------------------------------- # This location processes all other requests. If the request is for a file or directory that # physically exists on the server, then load the file. Else give control to ProcessWire. # ----------------------------------------------------------------------------------------------- location / { try_files $uri $uri/ /index.php?it=$uri&$args; } # ----------------------------------------------------------------------------------------------- # Pass .php requests to fastcgi socket # ----------------------------------------------------------------------------------------------- location ~ \.php$ { # Check if the requested PHP file actually exists for security try_files $uri =404; # Fix for server variables that behave differently under nginx/php-fpm than typically expected fastcgi_split_path_info ^(.+\.php)(/.+)$; # Set environment variables include fastcgi_params; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # Pass request to php-fpm fastcgi socket fastcgi_pass unix:/var/run/example.com_fpm.sock; } }
    1 point
×
×
  • Create New...