Leaderboard
Popular Content
Showing content with the highest reputation on 10/02/2015 in all areas
-
This is not even about defending the system, it's about defending the quality of the posts in the forum. It's quite amazing that someone that joined the forum 4 days ago, already has 52 posts, with a posts/likes rate of 52/1, and started 5 new topics, two of them named after modules that have their own topics. @cssabc123, this is a great community where people are always eager to help and discuss things, but you are expected to do your own work and some research before asking questions and raising these kind of topics, otherwise you're just wasting everyones time.11 points
-
8 points
-
Number 15. Above the symfony author. http://www.cloudways.com/blog/php-influencers-to-follow/7 points
-
I just wanted to post this in an additional location for those that may not know about, or frequent the ProcessWire Blog. This is a great source of information that describes possible uses of the various field types, and the optional modules that accompany ProcessWire. https://processwire.com/blog/posts/processwire-2.6.19-plus-guide-to-optional-core-modules/ Take a few minutes and read this article. It helped me to find elements that I didn't know I needed.7 points
-
The website for one of the prominent four-letter political parties in Northern Ireland has been powered by ProcessWire for almost two years now. It currently has about 15,000 pages, and serves in excess of 130,000 requests per day running on typical cloud hosting and minimal PW and CloudFlare caching. Not too bad I don't think (on several levels), but nowhere near some of the bigger sites powered by PW by far (going solely from the Showcase area of this forum). Without giving too much away, it's still happily and securely running the PW version that was installed during its development two years ago. There's also been zero maintenance issues to deal with since launch, a lot of which I believe is down to PW itself.6 points
-
6 points
-
It very much depends on how the numbers are gathered. Here in Germany we have a saying that states: "Never trust a statistic you didn't forge by yourself". So do your own research. It's useless to go with a most used tool (e.g. wordpress) if it doesn't fit your needs. And nobody does know what you need but yourself. You can always use contributor counts or surveys as guidelines, but taking them for facts is in my honest opinion just stupid. Any single dedicated contributor is worth much more than any 100 contributors that issued/fixed a typo in the code at some time. These numbers aren't more than hints on how well a project is doing.5 points
-
Hello, honestly that was my first concern,too. But I quickly realised how easily things can be put together without needing a module for this, another one for the next task and so on. In PW I can do almost everything using my templates. Makes me independent from 3rd party module developers once there are upgrades. I expect things won't break that much when PW is upgraded to a new version. Glad I found PW!5 points
-
google.com search.use wordprss now I herd and www.heavensgate.com finaly switch.too5 points
-
From time to time someone appears from nowhere and starts the same discussion that we had already over and over, without even taking the time, or having interest to read a bit of what was said before here in the forum. I quickly found an example of a discussion that you could/should have read before https://processwire.com/talk/topic/7565-making-pw-more-userfriendly/ I'm sorry if I sound rude, but after having answered and seen many others answering to some of your multiple questions from last week —which clearly show that you didn't get anything of how PW works—, I can't take these sudden very profound questions seriously.4 points
-
Visual Page Selector Released 31 March 2016 https://processwireshop.pw/plugins/visual-page-selector/ As of 04 January 2018 ProcessWire versions earlier than 3.x are not supported ******************************************************* ORIGINAL POST ******************************************************* Introducing VPS, a commercial visual page field selector. This is a pre-sale closed-beta version. This post is WIP and will be updated now and then. ############################ Many ProcessWire users use the 'one image per page' principle to manage and reuse images across their sites. This works fine. However, for site editors who mainly work with images, especially for larger sites, it is sometimes difficult to remember the pages where particular images reside. This module helps to solve this challenge. Harnessing the awesomeness that is ProcessWire, VPS provides a rich editing experience, enabling editors to search for, view, select, add, remove and delete page-images easily, in an easy to use and friendly interface. ProcessWire Lister is the workhorse behind the lightning-fast searches. Editors will be able to search for images by their descriptions, names, partial names, page names, templates, etc. Current Features Single-image mode Full search Batch add/Remove/Delete Image/Delete Page in page fields Image Browser Selectable pages as per page field settings + Lister filters Grid and List View Draggable sorting Responsive (almost fully ..iframes!) Planned Features Multi-image mode (there are times you want to group similar images in multi-image field in one page; e.g. the back, front and side of a car photo) Configurable CSS on the fly resizing vs real image resizing (image resizing can quickly hog memory) Other as per feedback from beta testing FAQs When will this be available? Soon. How much will it cost? Reasonably priced. Announcement soon. Where will I be able to buy this from? At all fine stores that stock quality ProcessWire products Do we really need another page field/inputfield select? See links below. What type of licenses will be available? Soon to be announced. Can I beta test this? Thanks for the interest but all available slots have been taken. Video (excuse the video quality please - too many takes....) Screens Previous Discussions https://processwire.com/talk/topic/10927-wishlist-select-pages-by-thumbnail/ https://processwire.com/talk/topic/4330-get-image-from-other-pages-via-images-field/ https://processwire.com/talk/topic/417-extending-image-field/?p=6982 https://processwire.com/talk/topic/7073-profield-table-and-gallery/ https://processwire.com/talk/topic/3200-image-management-concerns-is-processwire-suitable-for-me/ https://processwire.com/talk/topic/425-file-manager/ https://processwire.com/talk/topic/10763-asset-manager-asset-selector/3 points
-
The maxlength attribute on textareas is an html5 attribute and the inputfield's implementation is older than html5. It does support maxlength only in conjunction with an fieldtype textarea, which would ensure the max length on the server side.3 points
-
Just visit and you'll see who uses WP PW http://processwire.com/about/sites/ to get it down to an final result - take it or leave it - depending on your choice...we all have to choose right or left. What i've figured out is that PW people defend the system if there were serious arguments....and don't get too religious and frenetic if arguments are not on the table. Maybe you'll interest in the great fishy post from ryan3 points
-
Another small update that swaps out placeholder.it for lorempixel which means you can now have real images and you can even configure from their categories to tailor the images to your site: Abstract Animals Business Cats (although I almost want to remove this option) City Fashion Food Nature Nightlife People Sports Technics Transport I also fixed the image output - I had forgotten to return a pageimage, rather than a path. EDIT: because this now returns a pageimage, the images are copied to the page's files folder so I have added a cleanup routine to remove all images when the module is uninstalled. I thought I had previously created a pageimage at runtime without it being added to the assets/files folders, but for reason I don't seem to be able to do that - did I imagine that?3 points
-
No, it doesn't really work that way, but at the same time you are stating the obvious, and it won't ever be necessary to appeal to people who want plugins. @cssabc123, can you provide some examples of sites you have developed? For example some successful sites that run Wordpress with a lot of plugins? I have such sites, and it's no fun at all. Yesterday a WP ecommerce site broke on iOS9; 3 hrs to upgrade the template to fix it. When i login to this site there are alerts all over the admin about licenses that need to be renewed, plugin updates, and stuff like that. We can barely keep track of the plugin subscriptions needed to make this site work.3 points
-
Actually the pages approach of PW scales incredibly well and is actually one of its most useful models allowing so much flexibility. BUT, in some cases if you don't need the flexibility of the pages approach you can make use of FieldtypeOptions to categorize things. You could also use Profields Table if it better suits your needs. For quickly populating pages for use as categories, here are some helpful modules: http://modules.processwire.com/modules/process-page-field-select-creator/ http://modules.processwire.com/modules/batch-child-editor/ http://modules.processwire.com/modules/process-batcher/3 points
-
I got talked out of using Wordpress for doing a site for our startup by one of our partners. He had used PW before on a personal project of his. I come from a Enterprise Dev background, so learning all the nuances about Web Development as a "beginner" plus having to learn a CMS that required more work than other CMS seemed like a tall order. Tight Deadlines did no favours. Looking back, I'm glad I got talked out of it One thing that worried me in the beginning was the apparent lack of plug-ins for Processwire as compared to WP. But realised now quality > quantity. And a great dev community to boot.3 points
-
Sure! There are some minor issues I'm aware of that needs to be eliminated, plus creating some (very) basic admin settings to it. Mass optimizing could be an issue with many images but that's something I will ignore in the first round.2 points
-
Ha! Nice try, but I know that you are trying to trick us into revealing we are all PW fanbois. I will counter the trickery with a reverse double jinx and vote for Wordpress = 12 points
-
$this->addHookAfter('Pageimage::size', $this, function(HookEvent $event){ $thumb = $event->return; // Replace thumb file with optimized one. });2 points
-
I had been so tempted to post about the logo a few days ago! But seemed so silly to do it. Though I find it very amusing that minimal details in both logos make them quite different in the end. Too bad they got hacked, I follow a few artists that get support there. One of my favourites.2 points
-
Aww crap. Especially now that the ad blocking debate rages on, Patreon is among the few services that provide an actually viable alternative for independent artists and content creators to support themselves. I hope they don't take too much damage from this, as that would be a real shame. Also, I hope they get their shit together, as the data seems to point out that there are gaping holes in their security2 points
-
Excellent. Can't wait to get my mitts on it.2 points
-
Wordpress already caters to those people, why try and compete? Most of the modules it has look like they are built by non-developers as well, there is no quality control. It is a non-developers world all round I don't want to turn this thread into a Wordpress bashing. As Martin pointed out you can Google developers views on it without even comparing it to another CMS/CMF.2 points
-
Hi everyone, This is an early (but mostly functional) version of a module that I am experimenting with for automatically populating all empty fields on a page. It is designed for use during site development and should be uninstalled once the site is live. https://github.com/adrianbj/AutoContent (anyone have an idea for a better name?) It currently supports the following field types: Text - outputs "This is an example Field Label", where "Field Label" is the label for the field Textarea (RTE and plain) - configurable content from http://loripsum.net/ and embedded images from http://lorempixel.com Datetime - honors output formatting and returns random date/time with configurable min/max datetime Integer - honors min and max settings Float - honors min, max, precision settings URL - returns a random URL Email - returns a random email address Image - you can specify image category (people, nature, business, etc), and the range for min/max number of images to generate. Page - creates runtime selected child page content for output - not well tested yet. MapMarker - not well tested yet! I will be adding support for Profields and other selected 3rd party fieldtypes shortly. Highly configurable content is provided by: http://loripsum.net/ http://lorempixel.com/ https://github.com/fzaninotto/Faker Generated content can be localized to your region - very handy for addresses, people's names, phone numbers etc: Many fieldtypes are configurable via the Input tab on the field's config settings, eg: Textarea: Text: Images: Datetime: In general I am designing this to work with minimal/no configuration so you can install and have all fields on all pages on your site immediately populated for testing layout and styling without the need for manually adding dummy content. There is also a dummy page batch creator and deletor (automatically tracks and deletes just the dummy pages) available from the module config settings page. Please let me know if you think you will find this useful - trying to get an idea of how much time to put into support for additional field types.1 point
-
A site I've never heard of before has been hacked. I couldn't resist posting here, however, because their logo reminds me of a good friend. Info on the hack: http://arstechnica.com/security/2015/10/gigabytes-of-user-data-from-hack-of-patreon-donations-site-dumped-online/ Patreon's site: https://www.patreon.com/1 point
-
Hello! I like to share a project developed using ProcessWire. App-UNIVERSE.net is a modern online service with software database download. We provide access to a rich app database for desktop operating systems based on Windows and Mac OS. Within each category we present both free and commercial apps used by professionals in industries as movie creation, interior design, transportation, creating presentations, coding apps and games, etc. All available apps in App-UNIVERSE contain information like license, name of developer, date of app update, actual description of main features and direct links to files hosted on developers homepage. Site visitors can search for apps not only through the catalog, but also an advanced search engine. Applications can be searched by criteria such as category, developer, name of the application or alternative. Unlike many competing sites we do not offer download of files via download assistant that under the pretext of simplifying the process of installing apps are spying software and are installing in system toolbars and other unnecessary components. We focus primarily on all valuable apps that we can height recommend to our users.1 point
-
I'm unable to find out how to hook the process of creating image variations. I would like to use resmush api to optimize images. I'm using the service successfully on adding images using $this->addHookBefore('InputfieldFile::fileAdded', $this, 'optimizeImage_InputfieldFile'); and I also added a new optimize() method to image fields that can be used like this: $page->image->size(100,100)->optimize()->url But it would be nice if it could be fully automatic. That is: optimize on upload - DONE optimize on request - DONE optimize automatically if new image size is requested (eg. changing from size(100,100) to size(480,200)) - FAIL ImageSizer::resize seemed the right one but it returns only "true" and I can get only the image file name in the cache dir. What I would need is the final image path and final image url. Any thoughts on this?1 point
-
@cssabc123, I'm debating the intention of your posts, but they are really starting to strike me as trolling. If you want to talk about all the finer points of Wordpress, there is an excellent place to do that. Many of us take time out from our schedules to participate in these forums, and one the whole the community here tends to provide very thoughtful/courteous replies. This thread has meandered all around, and as your questions are answered, you seem to move on to something else. Again, I don't know your intentions, but it is becoming increasing difficult to take you seriously.1 point
-
hi tpr, do you plan to publish your work as a module? could be quite helpful to many others i think1 point
-
All, think we figured it out. There was one iPv6 Setting pointing to the old domain. We deleted this record, now we see the new site all the time. Its good to have an extra set of eyes on something, thanks to all that helped on this.1 point
-
1 point
-
Thanks Horst for reply. PHP 5.4.1, but also same message on shared host (Linux, PHP >5.4) sorry it's mistake writing it here (there I have one variable), yes also try all options single/double quotes1 point
-
1 point
-
Of course GoDaddy can see the website (it's local to them, they pushed or received the DNS change, they have multiple high capacity links and the affected website is at one of their facilities). Of course register.com can see the website (they pushed or received the DNS change and have multiple high capacity links). Other people (your users throughout the world) won't see the new website until the probable DNS propagation issue is resolved. That's the most likely situation for this issue, however it's still most likely a hosting provider (ISP) problem and there could be other configuration issues. The propagation of DNS information could be affected by many reasons (for the users who cannot see the new website).1 point
-
Sorry, I wasn't very detailed. i actually meant you or the hosting provider (ISP) needs to flush the DNS cache from the cPanel (or it's equivalent). On some hosting providers, you can do it yourself (i.e. DreamHost). Normal DNS propagation takes at least 72 hours or longer. It all depends on where the actual server is located, that's why some see the website where it's been moved to and others still see the old DNS information. There are times where due to traffic congestion or other router issues, the updated information doesn't make it everywhere (across the world) in a timely manner. Flushing the DNS cache will restart the process and usually things will start working as required. You are correct that you need to work with the hosting provider (ISP) to clear this up. GoDaddy support should have been on top of this, since they are hosting the website now. Please open a trouble ticket with them and good luck.1 point
-
1 point
-
Are you wanting this in xml, or are you wanting to create an html page, or is this to output the markup for your navigational elements? You could make a recursive looping function and feed it the parent element and in that loop call itself to output what you need from the child elements. There are a couple examples from sitemap examples in Ryans sitemap.xml generator, or my lill guy that I based off his that outputs a sitemap in json. Ryan's - https://processwire.com/talk/topic/3846-how-do-i-create-a-sitemapxml/?hl=sitemap Mine - https://processwire.com/talk/topic/11015-json-sitemap/?hl=sitemap You could also try out soma's module if you are looking for something already done. Let me know if you want me to give you a mod on my function.1 point
-
1 point
-
You should tell Mark Z. about this - he could have saved himself a fortune on hiring expensive developers - he could have gone with the local Mom and Pop web designers. PS I assume you are kidding1 point
-
I am glad that you appreciate my answers and I am happy to help, but as diogo pointed out, all this info is already available in the forums. One thing that might really help you to learn is to use google to search these forums - the built-in search for IP.Board forums is pretty useless. On the overhead of using pages - that really isn't true in most situations. And Profields is a multifaceted product, but the Table field component definitely reduces the number of pages - everything for a field instance is stored in one database table. Can you point us to any CMS that could run Facebook? They have created there own version of PHP to handle their needs!1 point
-
https://blog.documentfoundation.org/2015/10/01/tender-for-design-and-implementation-of-all-about-libreoffice-community-and-developer-dashboard-201510-01/ Thought some of you might be interested in this gig. This is a bit silly, but I think it will be negotiable:1 point
-
But that is the market that Wordpress caters for, I disagree strongly that every CMS should be geared towards the non-developer. Is Processwire easy to use for a non-developer once it is setup, oh yes, easiest thing ever. Question; what does a non-developer do when they cannot progress their Wordpress site any further? They have installed so many plugins trying to do what they wanted to do, its crawled to a halt and made it vulnerable turning the agency they hand it over to into a Wordpress maintainer. What does somebody who is using Shopify do when they grow too big for it? Point being there are tools which are great for starting something, and there are tools that are great for starting something and finishing the job properly. I like where I am going with tools. Wordpress is a screwdriver, Processwire is a power drill . Processwire will go wherever your imagination takes you, quicker and easier, right here, right now [citation needed]. What the future holds nobody really knows. What if some great developers left Wordpress and screwed it up, that could happen, there is no crystal ball. Lets not forget that Wordpress is a blog, and will always be developed as a blog. Even in the activity link you posted, they comment heavily on blogging. I would love to see how many Wordpress installs are actually active and not just sitting on a server getting auto updated. Wordpress with the ACF plugin kind of turns it into a CMS, but ACF is a hog. I go back to my previous post and extend it. Long-term, my personal choice right now is to use Processwire, it seems perfect for my business model. Once setup I can let most of my clients run away with it with no manual, telephone calls or handover meetings. Not really sure on the Windows, Unix, iOS comparison, or how iOS took over?1 point
-
Repeaters may seems like a good fit if you're new to pw, but they aren't. Use pages and create a page for each file. This way you've the full freedom of choice about which data is associated to a file and which access roles you need. For categorization and/or frontend-display use pagefields. I also suggest you to read this topic before beginning: https://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/1 point
-
You got it... You could think that it's a row in the database but that's not the case. (Dive in MySQL to find out) Every field is stored separately with the ID of the page. So ProcessWire makes joins (indexed) to give you all the data back what you're asking ProcessWire. So Loading a page and calling the title will only load the title, leaving the other fields alone... ..... silly me... Welcome Nanook !1 point
-
Hi, I'm not sure if this can be useful or not. Check by your self. I have created a little module around a set of 42 svg icons. (nearly a copy from Windows 10 iconset). It is very rudimentary at the moment. One can define settings for colors and size of the svg variations. Variations will be created on demand in a central directory (assets/svgicons/) and cached for later usage. The settings can be passed as selectorstrings. You can use a template variable $icon. To output markup for a plain svg icon in an image tag, you need to call the name: echo $icon->img("name=lock"); echo $icon->img("name=unlock"); If you want use it as a rollover with hover state, you need to call the function markup: echo $icon->markup("name=attention"); This gives you markup with default settings. If you need a clickable link, just define it in the selector string: echo $icon->markup("name=attention, link=/about/"); You can set / change the default values from template like: $icon->setColors(array(0, 111, 187, 0.2), array(219, 17, 116, 1.0)); $icon->setSize(180); and / or you can use individual settings for each icon: echo $icon->markup("name=document, size=32, color1=#775599, color2=blue, link=/about/"); // HEX colors or named colors echo $icon->markup("name=idea, size=120, color1=255-255-0-0.3, color2=255-255-0-1, link=/about/"); // RGBA colors echo $icon->markup("name=home, size=20, color1=230-0-0, color2=230-0-0, link=/about/"); // RGB colors . For the rollover / hover markup there is a piece of css needed what can be outputted (only once). It can be fetched with or without the style-tags: echo $icon->css(); // with style tags echo $icon->css(true); // suppress the style tags . The functions that does not output markup return the module itself (the $icon object). So you can use them chained: // all functions that can be chained: $icon->emptyCache()->setSize(100)->setColors(array(0, 111, 187, 0.25), array(243, 79, 159)); // after such a (re)set call, you only need to pass a name to each icon call to get consistent results: echo $icon->markup("name=lock, link=/logout/"); echo $icon->markup("name=unlock, link=/login/"); // you can override single settings, ->mu() is a shortcut for ->markup() echo $icon->mu("name=trash, size=200"); echo $icon->mu("name=key, color2=red"); // ->presentation() print the whole collection with optionally individually specified size and colors: echo $icon->presentation(100, array(0, 111, 187, 0.25), array(243, 79, 159)); . . . The code is here in a gist: https://gist.github.com/horst-n/f6922f6fa228991fd686 . Download it as ZIP! . . A live demo is here: http://images.pw.nogajski.de/svg-icons/ . .1 point
-
I never tried Forward, but ngrok works great with login in the backend https://ngrok.com/1 point
-
You've been using MODX but now you've found ProcessWire. It’s totally amazed you and you can’t wait to get started. But…you are wondering where everything is. If this is you, read on… This guide is primarily aimed at those who are coming in from MODX and wish to know how to accomplish “MODX things” the “ProcessWire (PW) way”. This is not meant to be a full blown PW tutorial. It will focus on some key MODX concepts/tasks and how to accomplish those in PW. It will cover, whenever possible, both versions of MODX - Evolution and Revolution. The guide assumes that you’ve at least logged into a PW site and/or viewed a demo. The Table of Contents mostly reflects MODX terminology. Table of Contents 1. Manager 2. File System 3. Resources 4. Templates 5. Template Variables (TVs) 6. Template Files 7. Snippets 8. Modules 9. Plugins 10. Chunks 11. Miscellaneous 12. Examples - the PW way… a. Template Variables b. Snippets c. Modules d. Plugins e. Chunks 1. Manager In PW, the “manager” is referred to as the “Admin”. The default location of the Admin is www.yoursite.com/processwire. As of PW 2.3, you can rename the Admin to anything you wish during install. Just be careful to remember the name you use or you will be locked out! (If that happens, there are ways to get around it though). Logging into Admin, you will notice a tree just like in MODX. The Admin runs on jQuery UI and as you’ve seen, it is insanely fast! Don’t be fooled by its simple facade. PW is a really powerful CMS, highly extensible and very easy to use. Customising the PW admin is very easy. There are a number of custom themes available. It is also trivial to make yours. Custom Admin themes go into the folder site/templates-admin/. You can have only one theme at a time. On a related matter, if you wish to create a custom Admin page, it is easy to do so. See this thread for more info. 2. File System After installing PW, you will see two main folders; “site” and “wire” in your file system. Site is where all things related to your site reside. This is your playground and will survive an upgrade. Wire houses the Core. You will never have to go into that folder. 3. Resources In MODX, Resources can be many things (documents, etc.). There is no such term in PW. However, the most important “resources” you need to know about in PW are page and pages. Pages are a very powerful concept in PW. Page can refer to your website’s frontend pages, i.e. what can be viewable by your website users. I say can be for a reason. There are many uses for Pages in PW. This can be confusing to newbies but once you get the concept, you will appreciate the power of the system. Just because something is a Page does not mean it has to be viewable. It can have other uses such as a container that holds data for use by other Pages - in this case the Pages do not have to be displayed on the frontend. In fact, everything you see on the PW tree is a Page. That’s right; even the Admin and its components (Users, Roles, etc.) are all Pages! Still confused by Pages? Have a read here. Pages reside in the PW tree - you may have noticed . You can drag and drop pages to move them around. If drag and drop doesn’t work you probably have MySQL 5.0.5.1 installed. Upgrade your MySQL and you are sorted. The root of your site is the uppermost Page in the tree. In the default PW install this is called Home. You can change the name to something else. The default PW install comes with a number of Pages pre-installed. Try editing a Page. All those Fields you see on that Page when under the “CONTENT” tab? They are not default Fields. They are all Custom Fields! Yes, not even the Title! The only required Field for a Page is “name”. You find this under the “SETTINGS” tab on the page edit screen. More about Fields below… Other related stuff: Menuindex: As an aside, if outputting something like a menu, unless you state otherwise, it will reflect the tree hierarchy. Show in Menu: This functionality is covered by the Page status, whether hidden or not. Hidden pages do not get output on menus (more about menus later) unless explicitly stated so using PW API selectors (see below). Menu Title: No such term in PW. You can name your menu items what you wish to name them. Very important: All Pages must be assigned a Template. 4. Templates In PW, Templates mean something slightly different compared to MODX and many other CMS. MODX describes templates as: That is not entirely true of PW Templates. In PW, the term Template is used in the sense of the English definition of the term: PW Templates serve as a pattern for the foundation of your Pages. By foundation, I do not mean the HTML or CSS. Rather, the Template servers as blueprint for your Pages. What is available to the Template is available to the Page that uses it. Templates establish a pattern for the Pages by the inclusion of Fields to the Template. A Template can have as many or as few Fields as you wish. You can create as many or as few Templates as you wish. You can easily change the Template a Page uses when editing the Page. See under SETTINGS. Note that if you have Fields on that Page that are not in the Template you are switching to, those Page Fields will be lost! PW will warn you about this when switching Templates though. OK, so how do you show “Resources to the world”? That will be the work of Template Files which we’ll look at in section 6. 5. Template Variables A powerful feature of MODX is Template Variables (TVs). If you loved MODX TVs you will absolutely adore the PW equivalent. In PW, TVs are known as Fields. You can define your own Custom Fields. In fact, you will need to create your own in most cases. This is because PW does not have any required Field except for “name”. It is perfectly reasonable to have a Page with only the name Field! Many people do add at least a Title Field for such Pages. In the default PW install, the reason you see the Title Field in all Templates is because it has been set as a “Global” Field under the ADVANCED settings of the Field (edit the Field to see this setting). There are many types of Fields to hold all sorts of data - images, texts, urls, passwords, reference to Pages, etc. You can call your Fields anything you wish. You can call the Field for your main content “body”, or “stuff”, or “content” or whatever you wish as long as you follow the naming convention, i.e. “[a-z], numbers [0-9], or underscores (no dashes or spaces)”. Fields are reusable across different Templates. The order in which they appear on your Page follows the order in which they are arranged on your Template. However, it is important to note that: The order in which Fields appear on your page and/or the inclusion of a Field on your Page does not mean that: The Field will be output on the Frontend. The inclusion of a Field on a Page does not automatically mean it will be output; PW does not make that decision for you. It only makes the Field available to you to use as you require. You can output all or none or few of the Fields on your Page. The order in which Fields appear on a Page does not mean the same order will be reflected when you output the Page. You make that decision. Also note that you are able to arrange Fields side-by-side on your Page (via settings on the Page’s Template) to mimic your site’s layout or for other visual/ease-of-use purposes as you edit the Page in the Admin. You can also give each Field a label and a description. These will appear above each Field when editing a Page. In most cases, the content of Fields will be saved directly to the database. In the case of file related Fields, the path to the file will be stored in the database. There are no direct equivalents of MODX TVs “@Bindings” (data sources). These are inherently built into the different types of Fields. Note that you cannot run PHP code within Fields (so no @Eval). This is by design. Fields are a very powerful and much loved concept in PW. Just Google "custom fields cms" and you’ll see what comes up tops. 6. Template Files So far, we've seen that you create Fields, add them to a Template you've created and edit a Page using that Template to input your content into that Page’s Fields. So far so good but how do you output the content to the world? You do this via Template Files. Template Files live in /site/templates/. You have to create your own Template Files. In MODX, a Template will have both system fields, e.g. body, title, etc. and custom fields (TVs). Rendering a Template is achieved by adding MODX tags to your Template. In PW, in order for the content of your Page to be seen by the world, its Template must have a Template File (or there must be some other Template File associated with a different Template that is dynamically pulling and outputting elsewhere the content of a Page whose Template does not have a Template File). This does not mean that all content within a Page will be automatically output by the Template File. No; in the Template File you can choose to render all or some Fields present in the Pages using that Template or none at all! You tell the Template about the associated Template File when you create/edit the Template. PW assumes that there is a Template File with the same name as the Template in /site/templates/ and will tell you if it does not find one. However, you have two other choices. You can either enter an alternative name for your Template File or tell PW you do not wish to have a Template File for that Template. This means that a Template does not require a Template File. Obviously, in such a case, you will not be able to directly output the content of the Pages using that Template. In some cases, that is exactly what you want . As you get to know more about the system, you will find out how powerful and flexible the PW Template system can be. For instance, you can use your Template as a controller. That’s beyond this guide but feel free to search the forums for more info. Template Files are typically PHP files with logic to dynamically output your content. In most cases, Template Files are HTML with PHP tags inserted to output your content. The PHP in the Template File will in most cases be PW API. Hence, you will see things like $page and $pages in Template Files. The former always refers to the current Page and the latter to any other Pages in the system. These are very powerful variables in PW and give you access to ALL information about ALL pages including their Fields and whether those are empty or not, etc. See below for more info about these variables and have a look the docs too. Note that Templates do not care about what’s in your Template Files. In fact, they won’t even check. All they want is for you to tell them if and how you wish your Pages' contents to be rendered. Your Template Files can even contain pure HTML (although that won’t be dynamic!)! Your Template Files can have references to other things related (or not related!) to the Page using that Template File. For instance, within your Template File, you can pull in the 10 latest “posts” from your Blog or the Children Pages of that Page. There are just too many possibilities to list them all here. Don’t let the PHP in Template Files scare you if you are no coder. I am no coder but I am able to use PW. You will only need to know at least some very basic PHP to use PW. The most important are: echo; foreach; and if… Anything else is a bonus in most cases. In addition, you will need to know how to use the two most important PW variables - $page and $pages. With these two, most of what you would have done in vanilla PHP is covered. They are easy to use and to understand and very much follow the jQuery concept. Check out the docs to learn more. 7. Snippets In MODX, Snippets are the method by which MODX allows you to run dynamic PHP code in any of your pages. In PW, the term Snippets does not exist. What!?! Not to worry; in PW MODX-like Snippet functionality can be achieved in two ways: Template Files: Most PW Template Files are essentially dynamic PHP code. That’s Snippets for you right there. PW Modules: PW Modules do what MODX Snippets do and more (see below). It’s just an issue of terminology. For instance, the popular MODX Snippet WayFinder has a Module counterpart in PW. This is the Module Markup Simple Navigation. However, you do not need to use the Module to create a menu in PW. You can do the same thing using PHP in your Template File. See the default PW install for a simple example. Check out section 12 of this guide for example “popular-MODX-Snippets-to-PW-how-tos”. 8. Modules MODX Evolution defines Modules as “a program that can only be executed from within the manager.” There are PW Modules that fit this definition, for instance, the Module Batcher which is equivalent to the MODX Revolution add-on Batcher. However, there are other PW Modules that are executed in the frontend, e.g. Markup Simple Navigation previously mentioned. In fact, in PW, a Module is PHP that extends the functionality of PW. Modules contain PHP classes that adhere to PW’s Module interface. 9. Plugins In MODX Plugins are PHP code that are set to execute during certain system events. In PW, although the term Plugin does not exist (except maybe in reference to Modules), MODX Plugin functionality is easily doable in PW. This is achieved via Hooks. There is one difference though. In MODX, Plugins are standalone code you can download and install. You cannot download and install PW Hooks. Instead, PW contains many methods that you may hook into in order to modify the behaviour of the method. In other words, PW offers the ability to hook into its processes/events and manipulate them before or after the event or even replace them, etc. Hooks are usually invoked inside Modules. However, Hooks may be attached from anywhere that you use PW's API, for instance in Template Files. The average PW user will not need to use Hooks. For more info about Hooks check the documentation. 10. Chunks MODX defines Chunks as “bits of static text which you can reuse across your site”. There is no equivalent term in PW. You can, however, easily create Chunks in PW. You can create Chunks as a Page that contains various Fields each of which can act as a Chunk. This means you can have Chunks of all sorts of data. You can then set the Page you create to hold your Chunks as hidden (not available to searches). The Page can also be assigned a Template without a Template File to further limit frontend access. It can also be created as a child/grandchild of the page Admin. That will limit access by User (e.g. login required to view it in Admin). Accessing the Fields of that Page as your Chunks using PW API is quite trivial really. Since you can use labels and descriptions to further define each of your Pages’ Fields, this makes it quite easy to describe what each Chunk is for and/or give instructions on how to use the Chunks. See this example for more info. You can also simply use text files to pull into your content as Chunks. Personally I prefer using Pages as Chunks when I need to. In MODX, it is usual for many Snippets to use Chunks (HTML + placeholders) to structure their output (i.e. tpl Chunks). You do not need to do this in PW. Code output can be wrapped in HTML right within the Template File. The important thing to remember is that any Field in any PW Page is available to any other Page and any Template File. Cross-referencing Fields and Pages is child’s play. Seriously; it is that easy. 11. Miscellaneous Tag Syntax: PW does not use a templating language (tagging syntax) like MODX does. See this article why this decision was taken. I agree 100% with the approach and have come to realise its many benefits over using a templating language. However, there are two Modules that allow you to use template language tags in PW. I have never used them so cannot comment further. They are here and here. Settings Page: PW has no settings page like MODX. Many settings are set in the /site/config.php. Other MODX settings equivalents are interspersed in various places including caching content on a Template by Template basis and in Modules. You can also store custom settings needed for your site in the /site/config.php. You can even use Pages to store your settings as mentioned in section 10 (Chunks). Modularity: PW is a very modular system. The whole of PW is made up of Modules (Core Modules) that accomplish different tasks. 12. Examples - the PW way… In this section I will show you equivalent MODX versus PW add-ons as well as how to accomplish various task using PW “Snippets” equivalent. a. Template Variables As previously mentioned, MODX TVs are PW Fields (although PW Fields are more versatile). Outputting the contents of your Fields is very simple. echo $page->name_of_your_field; This gives you the contents of the Field in the current page. Works slightly different for image fields though. For other pages echo: One page $pages->get(ID or PATH or NAME, etc.)->name_of_your_field; //note replace ID with ID of the Page you want, etc. Many pages $pages->find("selectors"); //this will return an array. You can then go through the array using foreach as shown in the examples below to output the field(s) contents MODX - output main content of Page //MODX Evolution[*content*] //MODX Revolution[[*content]] ProcessWire - output main content of Page //ProcessWire echo $page->content;//note; this assumes you have a Field called content in the Template of the current page. In ProcessWire you can find Fields of other pages like so $fruits = $pages->find("template=yumyum, limit=10"); foreach($fruits as $fruit) { echo "<li><a href='{$fruit->url}'>{$fruit->title}</a></li>"; } //find 10 Pages that use the Template yumyum and echo their url and titles in a list. From these examples, you can see the elegance and flexibility of TVs done the PW way. Since there is separation between a Template and a Template File, you can conditionally echo out the contents of Fields found in Pages. b. Snippets Common MODX Snippets and PW equivalent Modules 1. WayFinder: Markup Simple Navigation or code in Template File (see head.inc in default PW installation for a simple menu). 2. Ditto (Evolution) and getResources (Revolution): Functionality inbuilt in PW. Use $page and $pages variables + selectors to find anything, anywhere. 3. Jot (Evolution) and Quip (Revolution): Comments Module is part of the PW Core. It is not enabled by default. You will have to enable it in the Admin. See also the related Comments Manager Module. 4. eForm (Evolution) and FormIt and FormItBuilder (Revolution): There are various Form parser codes in the Forums. There is also a commercial Form Builder Module. It’s not expensive, is developed by PW’s lead developer and proceeds support the PW project. 5. MaxiGallery (Evolution) and Gallery (Revolution): Presently, there is no equivalent. However, it is quite easy to build a photo album. See this tutorial in the wiki. There is also an Images Manager Module (still in alpha though). 6. AjaxSearch: Ajax Page Search Module. 7. Breadcrumbs: Quite easy to accomplish using PW API. See default PW install for an example. 8. FirstChildRedirect: Very easy to do using PW API like this: $session->redirect($page->children->first()->url); in a Template File. 9. getField (Evolution) and getResourceField (Revolution): Inbuilt in PW $page and $pages variables as shown above. 10. GetParent: Inbuilt in PW $page and $pages variables. E.g. $page->parent. 11. getPage: PW has inbuilt pagination as part of the Core (Pagination Markup Module). See this article for a quick tutorial. 12. UltimateParent: Inbuilt in PW API as rootParent. 13. if (Revolution): Use vanilla PHP with PW variable and selectors in Template Files. 14. VersionX (Revolution): Versioning for text-based fields is coming in PW 2.4 (release date summer 2013). Support for maintaining separate draft and live versions coming in PW 2.5 (Winter 2013/2014). Currently, there is also the Module Version Control for Text Fields. 15. getRelated (Revolution): No out-of-the-box Module for this. Has been previously accomplished using PW API in various ways. Have a look in the forums. 16. importX (Revolution): Import Pages CSV Module. 17. phpThumbOf: Thumbnail functionality is inbuilt in PW. There is also the Module Thumbnails that further extends this functionality. 18. getValue and getValues (Revolution): Inbuilt in PW. You can get the value of any Page using PW API - $page and $pages. 19. getFeed (Revolution): RSS Feed Loader Module. 20. MIGX (Revolution): Repeater Module which is part of the PW Core. It is not installed by default. You will need to do that yourself. For more info see this tutorial. 21. Articles (Revolution): See the Blog Profile Module. 22. NewsPublisher (Revolution): See below under Plugins. Examples MODX Ditto [!Ditto? &parents=`5`&extenders=`summary` &tpl=`tplBlog` &orderBy=`createdon ASC`&display=`6` &truncText=`Continue Reading This Article` !] PW equivalent $items = $pages->get(5)->children("sort=date,limit=6"); foreach ($items as $item) { echo $item->title; echo $item->summary;//etc. } //this assumes you have a Field called summary on that Page The first line in the above gives you all information about the 6 child Pages of the Page with ID #5. It returns an array. In other words, a basket of various documents containing all the info about those documents. Next, you traverse the array using foreach. In layman terms, you rummage through the basket picking goodies! In order to wrap HTML around the code output, we do it like this instead (there’s other ways to do it as well!) echo "<ul class='articles'>"; foreach($pages->get(5)->children("sort=date,limit=6") as $item) { echo "<li><p><a href='{$item->url}'>{$item->title}</a><br /> <span class='summary'>{$item->summary}</span></p></li>"; } echo "</ul>"; In this example, we have asked PW to grab the child Pages directly within the foreach rather than creating a variable $items first. MODX getResources // Output a list of child Resources of the current Resource, using the 'myRowTpl' chunk: [[!getResources? &parents=`[[*id]]` &tpl=`myRowTpl`]] PW equivalent echo "<ul>"; foreach ($page->children as $child) { echo "<li><a href='{$child->url}'>{$child->title}</a></li>"; } echo "</ul>"; //You might want to limit the number of child Pages you are getting if they are many! MODX getResources // Output the top 5 latest published Resources beneath the Resource with ID '5', with tpl 'blogPost': [[!getResources? &parents=`5` &limit=`5` &tpl=`blogPost` &includeContent=`1`]] PW equivalent echo "<h3>Latest Posts</h3>"; $posts = $pages->get(5)->children("limit=5"); foreach ($posts as $post) { echo $post->body; } c. Modules 1. Batcher and Docmanager (Revolution): Batcher Module (covers most equivalent functions). 2. DocFinder (Evolution): Inbuilt in PW default install. d. Plugins 1. QuickManager (Evolution): Several Modules can do this, i.e., Fredi, Page Frontend Edit and Inline Editor Modules. 2. ManagerManager (Evolution): Same functionality can be achieved using Templates, Access Control and the Modules Page Edit Field Permission, Page Edit Per User and Page Edit Per Role. e. Chunks See this example. Btw, the PW Cheat Sheet is you best friend... Hope this has been helpful! /kongondo1 point
-
woop, you hide the best part on the last slide. To quote his PDF: I like ProcessWire the way it is. Clean and minimal. Please, don't tell me how to do things. Instead focus on tutorials, guidelines and articles that explain how to use the tool ProcessWire to build great sites. My first site with ProcessWire was quite easy and not a complex monster. I learned how to use different field types and how to structure content with each project and I'm still impressed, when I find a new way to solve a problem with ProcessWire. That wouldn't be possible, if I had everything finished. Then I would say "Oh thats great but not exactly what I needed". ProcessWire as a clean and minimal CMS/CMF to build a website is great. Ryan should try to improve the system itself and keep bloat away. (In my opinion, the new 2.5 with all it's profiles is even too much to start). There are other areas to improve, beside the system and most of them were mentioned before in this thread: Better onboarding process that guides the users A single place for all the little code snippets and fragments. Tutorials for beginners and experts. Maybe have a look the new Kirby docs More site profiles to start with, but not bundled by default (Download during the installation?)1 point
-
I've tried 30 years to understand MS Word and didn't succeed ...1 point