rajo Posted January 12, 2018 Share Posted January 12, 2018 (edited) Hi, Has this community looked at site patterns and created some reusable getting-started models? I know PW is the malleable backend crafters use to roll their own brilliance, but no doubt, by now, some patterns have emerged for the best practices of how to layout the DB, what templates go with what pages, what fields go where, etc, when you're contemplating implementing a News site, vs. a Gallery, vs. a Corporate site, etc. If indeed such "best practices" have been documented, maybe the next step would be packaging those in an installable getting-going thang. I haven't used pw for a couple of years now. I'm currently looking at creating a site that's somewhat like a News site, with prominent articles, archives, some media. But I'm balking at having to roll the whole thing myself from scratch, versus getting a leg up with Bob's News Site Template, a distilled getting-started framework. There's barebones, which gives the most freedom, then there's flesh and bones meant to be extended. I'd think that as PW is maturing, there's enough repeatable history that something could be packaged. Are there such artifacts in this community? Or would that betray PW's anti-WP origins? Of course, these need not be free, as long as the "store" allows you to really grok the package before buying. Thanks. Edited January 12, 2018 by rajo typo Link to comment Share on other sites More sharing options...
psy Posted January 12, 2018 Share Posted January 12, 2018 You could look at @kongondo's Blog Module http://modules.processwire.com/modules/process-blog/ for your News site and this thread may give you some ideas on how to cut down front end development time 3 Link to comment Share on other sites More sharing options...
adrian Posted January 12, 2018 Share Posted January 12, 2018 I built ProcessWirePageLists a long time ago - it works with Migrator and lets you install the fields and templates (and in some cases pages) for getting started quickly. https://github.com/adrianbj/ProcessWirePageLists The `person.json` file is probably the most relevant to the question you are asking. You could easily build one-click installs of templates/files all sorts of things, like a blog, hotel booking field/templates, news articles, image gallery, ecommerce - whatever really. Maybe I should commit some more myself, but my original plan was to get user contributions to that repo. This is how you "install" them. They are pulled in at runtime directly from Github, so new ones are always available. This is what the JSON looks like for "person": { "templates":[ { "template":"person", "data":{ "useRoles":0, "childrenTemplatesID":0, "sortfield":"", "noChildren":"", "noParents":"", "childTemplates":[ ], "parentTemplates":[ ], "allowPageNum":0, "allowChangeUser":0, "redirectLogin":0, "urlSegments":0, "https":0, "slashUrls":1, "altFilename":"", "guestSearchable":0, "pageClass":"", "pageLabelField":"", "noGlobal":0, "noMove":0, "noTrash":0, "noSettings":0, "noChangeTemplate":0, "noShortcut":0, "noUnpublish":0, "nameContentTab":0, "noCacheGetVars":"", "noCachePostVars":"", "useCacheForUsers":0, "cacheExpire":0, "cacheExpirePages":[ ], "label":"", "tags":"" } } ], "fields":[ { "name":"title", "label":"Title", "description":null, "template":"person", "flags":13, "type":"FieldtypePageTitle", "data":{ "required":1, "textformatters":[ null ], "size":0, "maxlength":255 } }, { "name":"first_name", "label":"First Name", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":50, "size":0, "maxlength":2048 } }, { "name":"last_name", "label":"Last Name", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":50, "size":0, "maxlength":2048 } }, { "name":"portrait", "label":"Portrait", "description":null, "template":"person", "flags":0, "type":"FieldtypeImage", "data":{ "extensions":"gif jpg jpeg png", "maxFiles":1, "inputfieldClass":"InputfieldImage", "descriptionRows":1, "adminThumbs":1, "defaultGrid":0, "fileSchema":2 } }, { "name":"position", "label":"Position", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":50, "size":0, "maxlength":2048 } }, { "name":"department", "label":"Department", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":50, "size":0, "maxlength":2048 } }, { "name":"email", "label":"E-Mail Address", "description":null, "template":"person", "flags":9, "type":"FieldtypeEmail", "data":{ "size":70, "maxlength":255, "columnWidth":50 } }, { "name":"website", "label":"Web site", "description":null, "template":"person", "flags":0, "type":"FieldtypeURL", "data":{ "noRelative":0, "addRoot":0, "columnWidth":50, "size":0, "maxlength":1024 } }, { "name":"phone", "label":"Phone", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":33, "size":0, "maxlength":2048 } }, { "name":"mobile", "label":"Mobile Phone", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":34, "size":0, "maxlength":2048 } }, { "name":"fax", "label":"Fax", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":33, "size":0, "maxlength":2048 } }, { "name":"po_box", "label":"PO Box", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":50, "size":0, "maxlength":2048 } }, { "name":"address_1", "label":"Address", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":50, "size":0, "maxlength":2048 } }, { "name":"address_2", "label":"Address", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "size":0, "maxlength":2048 } }, { "name":"city", "label":"City", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":33, "size":0, "maxlength":2048 } }, { "name":"state", "label":"State", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":34, "size":0, "maxlength":2048 } }, { "name":"country", "label":"Country", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":33, "size":0, "maxlength":2048 } }, { "name":"skype", "label":"Skype", "description":null, "template":"person", "flags":0, "type":"FieldtypeText", "data":{ "columnWidth":33, "size":0, "maxlength":2048 } }, { "name":"twitter", "label":"Twitter", "description":null, "template":"person", "flags":0, "type":"FieldtypeURL", "data":{ "noRelative":0, "addRoot":0, "columnWidth":34, "size":0, "maxlength":1024 } }, { "name":"facebook", "label":"Facebook", "description":null, "template":"person", "flags":0, "type":"FieldtypeURL", "data":{ "noRelative":0, "addRoot":0, "columnWidth":33, "size":0, "maxlength":1024 } } ] } 6 Link to comment Share on other sites More sharing options...
psy Posted January 13, 2018 Share Posted January 13, 2018 @rajo forgot to mention in my post above... welcome back to ProcessWire Link to comment Share on other sites More sharing options...
rajo Posted January 13, 2018 Author Share Posted January 13, 2018 @psy thanks for the warm re-welcome and pointers. @adrian thanks for all that. I'll go see and learn, and perchance embrace. Link to comment Share on other sites More sharing options...
rajo Posted January 13, 2018 Author Share Posted January 13, 2018 p.s. I'm finding my bearings around here again. I think "Site Profiles" represent what I'm talking about, either in part or wholly. I'll go learn there also. I must say, I couldn't find a definition of "Profile" in the docs, I didn't know what that meant at large. https://processwire.com/ promotes the trees but doesn't say much about the forest and its varied on-boarding trails. 1 Link to comment Share on other sites More sharing options...
adrian Posted January 13, 2018 Share Posted January 13, 2018 2 hours ago, rajo said: I think "Site Profiles" represent what I'm talking about, either in part or wholly. Yeah, Site Profiles are nice, but what I like about my poorly named "Page Lists" is that they can be applied one-by-one as components as needed and also added to a site after initial PW install. I'd really like to build these out if we can get some community contributions. 2 Link to comment Share on other sites More sharing options...
rajo Posted January 14, 2018 Author Share Posted January 14, 2018 (edited) > I'd really like to build these out if we can get some community contributions. Gotcha. I look forward to exploring that space over the coming weeks. This is for a volunteer project that has nothing to do w/ my day job, hence my wanting some prefabs if possible. I like the component-based approach you're describing. To be continued... Edited January 14, 2018 by rajo typo 1 Link to comment Share on other sites More sharing options...
adrian Posted January 14, 2018 Share Posted January 14, 2018 If there is some renewed interest, I was thinking that it might also be a good if I extended the "Shared JSON Packages" import option in Migrator to also supportt zip packages which can then include template/css/js files and assets/files. Anyway, just throwing it out there as an option to see if there is any interest. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now