Leaderboard
Popular Content
Showing content with the highest reputation on 05/25/2012 in all areas
-
LanguageLocalizedURL module Localized URL generator and parser You can find the last version here: http://modules.proce...-localized-url/ Or from the repository on github: https://github.com/m...e-localized-URL This module is useful to generate localized url using the language code as first 'folder', and then the localized titles of the nested pages: (removed previous instructions to prevent double maintaining.) See more infos in readme of the module with instruction and informations. https://github.com/m...aster/README.md4 points
-
Sneak Preview (everything configurable, styling mostly controlled by admin theme):2 points
-
It's a bug, thanks Soma. Thankfully a simple one to fix, and just committed it. Also pushed the PageFinder updates after running through a lot more tests, so all should be in the live source now.2 points
-
Sure you can // get all pages that have at least 1 quote $res = $pages->find("employee_quotes.count>0"); // add all quotes to an PageArray $allquotes = new PageArray(); foreach($res as $r) $allquotes->add($r->employee_quotes); // shuffle or whatever you please $allquotes->shuffle(); // output all foreach($allquotes as $q){ echo "<p>$q->employee_quote</p>"; }2 points
-
For all you star wars fanatics: http://www.amazon.com/Darth-Vader-Star-Wars-Chronicle/dp/145210655X Arrived today and me and my 5 year old son both love it Please feel free to share other great stuff here.1 point
-
I think it's good to have this sort of functionality coming from a module. After all, all of ProcessWire's language support comes from modules that aren't installed by default. Multi-tree is the recommended way to build a front-end multi language site. The only reason multi language fields exist is because we needed a way to support in the admin while using the same page. It was just bonus that they can be used on the front end too. And perhaps they are revealing themselves to be useful enough on the front-end to warrant taking it further in the future. But multi language fields are very far from being a full solution, as only one field type of dozens supports multi language (FieldtypeTextLanguage, which is inclusive of FieldtypePageTitleLanguage and FieldtypeTextareaLanguage). I also don't want to start modifying and adding overhead to the core for features that aren't needed by everyone. This is what modules were designed for. So even if we do future expansion of multi language fields, I still think this is the role of modules. It's great to see what Mcmorry has done with this module, a lot of good thinking and ideas. If more and more people want to handle languages with fields rather than pages, I'm sure that the options will continue to grow.1 point
-
Since Soma asked what these buttons have to do there: This is just a button module where you can define some individual buttons and url. Like "add news" or even an url to a custom module or whatever:1 point
-
While developing my dashboard module I came across a lot of difficulties when building a configurable filter for selecting pages for the last pages widget. Some things I discovered: "or" filter in native page fields didn't work. Fixed by Ryan in the last commit (Big thanks!): https://github.com/ryancramerdesign/ProcessWire/commit/70093241b2cbfe7cae79f28531c1a5df1a572169 It is was somehow difficult/impossible to use get('/')->find(...). This resulted in weird results where direct children were not in the results array. Should also be fixed (not tested). There is an undocumented selector "has_parent" which looks for a parent up to the root. Quite handy! So "has_parent!=2" removes all admin pages (except admin itself, add id!=2 for that) from a select (thanks @Soma!). The "user" which created the standard pages is not the superuser. This was the reason I doubted my results because I thought the superuser would have created everything. Me stupid. The inputFieldSubmitButton module generates a button which gets doubled in the admin head section. Couldn't find the place where this happens until I found out that this is generated with Javascript. Me stupid again. Important rule for selectors: First "has_parent" (if needed), second "include=all" (if needed), then the other filters. And in the end "sort" and then "limit". Not sure about this, but this works for me, so I have only one selector which seems to be correct. For example the latest pages for a specific user which are not admin pages (and no trash): has_parent!=2,id!=2|7,include=all,created_users_id|modified_users_id=41,sort=-modified,limit=10 Looks easy, but wasn't (at least for me)1 point
-
Since Ryan posted that his prototype idea for a PW form builder I've not done much in this area. Rather than have the code sat under-utilized in a private repo I've now posted it as the fxForm repo under my github account in case anyone is interested. Currently you need the controller-element branch to get the latest code.1 point
-
Hi everyone, Lew's a very talented Sydney-based illustrator. He recently asked me to do a few upgrades on his site (which was running Textpattern). This gave me the opportunity to pitch a move to ProcessWire which he accepted having seen some other artist sites I'd done. http://lewkeilar.com/ Shout-outs go to Antti (Thumbnails) and Soma (PageListImageLabel) for their great modules which help make ProcessWire a fantastic CMS for artists. Regards Marty1 point
-
1 point
-
you mean an array with all the quotes? Not with a PW method, i think... you would have to loop through all the pages and through the repeater in each page, and then join the arrays. $allQuotes = array(); foreach($pages->find("employee_quotes.employee_quote!=") as $p){ $theseQuotes = $p->employee_quotes; $allQuotes = array_merge($allQuotes, $theseQuotes); } This should work. (it doesn't) edit: to echo all the quotes: foreach($allQuotes as $q) { echo "<blockquote>{$q->employee_quote}</blockquote>"; } edit2: wait, this doesn't work edit3: This does work: $allQuotes = new PageArray() // thanks to soma for this foreach($pages->find("employee_quotes.employee_quote!=") as $p){ $theseQuotes = $p->employee_quotes; $allQuotes = $allQuotes->import($theseQuotes); } foreach($allQuotes as $q) { echo "<blockquote>{$q->employee_quote}</blockquote>"; }1 point
-
Ah, sorry! it stays for reference It grabs the pages. pages->find() always returns an array of pages.1 point
-
Well.. after template specific field settings the need for new fields have been much less and it is easier to use more generic field names. My usual projects do have all or some of these for example: image images file files summary body date datetime tags (page field) I also have some common template names used in many projects: basic-page home members-home events event news news-item I try to use what is given on demo template. Also, trying to keep all the field and template names In English. Nothing too special here, interested to hear about others.1 point
-
If only there were more time. But I see all of this down the road, it's just a matter of time.1 point
-
You can use symlinks, but I also don't see any problem with just referencing the file you want directly. I'm not sure which multi site method you are using, but assuming you are using the built-in method with multiple site- directories. So if you want to include your /site-other/templates/home.php to include /site/templates/main.php, then you would just do this in your home.php: include($config->paths->root . 'site/templates/main.php'); Likewise for your base.css file, except that you would use a URL instead: <link rel='stylesheet' type='text/css' href='<?=$config->urls->root?>site/templates/styles/base.css' />1 point
-
calendar, weather, sudoku, stock market... i will tell more if i remember1 point
-
$class = $child === $page->rootParent ? " class='on'" : ''; is a short way of writing if($child === $page->rootParent) { $class = " class='on'"; } else { $class = ''; } $page->rootParent gets the ancestor that is closer to the root (a direct children of the homepage). If you change the homepage variable to a something different from the root, they will never match. For this to work you have to replace $page->rootParent for this page's ancestor that is closer to /en/. Put something like this after the first lines: foreach($page->parents as $v) { if($children->has($v)) { $newRootParent = $v; } } Then replace $page->rootParent by $newRootParent. I'm not on my computer, and I can't test this right now, so, no guarantees here1 point
-
I think this is what you want $homepage = $pages->get("/"); $children = $homepage->children->find("visibility_in_top_menu=1");1 point
-
How about a module repository -- and code that allows PW installations to scan the repository for new modules & updates?1 point
-
I've been a user of textpattern (my first love) and ExpressionEngine. I came to ProcessWire after looking through Ryan Scherler's portfolio. I was searching for an un-bloated CMS that had some of the features I like of both txp and EE - custom fields, templates as files and a few other things. I knew that if I picked up PW I'd struggle at first because of my lack of PHP knowledge but I didn't fancy getting into bed with another tag-based system either. I found that the API wasn't that hard to get my head around and that if I applied myself to learning some PHP I could do some of the same things in PW that'd be a complete pain or required numerous plugins or add-ons in txp or EE. I've gone through a few system upgrades with EE I can honestly say it's a complete PITA. Only having to upgrade one core directory in PW is a dream and a half. After a while I decided to set PW as my go-to CMS. It successfully out-ticked txp and EE on quite a few of my recent projects. Being able to build a site is one thing. Putting it in front of a client that hasn't used it - or any other CMS for that matter - is a great testament to how well thought out PW is.1 point
-
Continuing from the Repeaters thread about the field-template context… This video demonstrates how you can adjust the admin context of individual fields according to the template they are placed in. When you adjust the context in this manner, it only changes the settings for when a field appears in that template. This expands the reusability potential of fields across different templates, hopefully preventing the need to create another field if all you really needed was a different title, description or width. You can do this same type of configuration when editing a field in a repeater too. View this full screen which should put YouTube into HD mode, where it's much easier to see.1 point