-
Posts
11,192 -
Joined
-
Last visited
-
Days Won
373
Everything posted by adrian
-
Well the definition of cute that I remember from my Aussie upbringing was: "Ugly, but interesting" Glad we got that cleared up
-
Cute ? I actually thought it was pretty functional - nicer to be able to click on the parent item or expand it to access the children. You not sold on the idea?
-
I actually love the way meanmenu handles this issue: http://www.meanthemes.com/demo/meanmenu/demo.html
-
echo $page->documents->description; should work just fine. I think it is likely your documents field is set to handle more than one image, so you will need: echo $page->documents->first()->description; I just did a little testing a noticed something slightly unexpected. When there is one image in the field you get: echo $page->documents; //selfie.jpg echo $page->documents->first(); //selfie.jpg echo $page->documents->url; //site/assets/files/xxxx/ echo $page->documents->first()->url; //site/assets/files/xxxx/selfie.jpg echo $page->documents->first()->description; // image description echo $page->documents->description; // blank With two images in the field, you get: echo $page->documents; //selfie.jpg|selfie2.jpg So I guess I had never noticed that you actually get the filename returned from a files array. I would have expected an error with: echo $page->documents;
-
A couple of options from Soma for achieving this: http://processwire.com/talk/topic/3159-hide-settings-tab-in-page-edition/?p=31126 http://processwire.com/talk/topic/4680-block-access-to-settings-delete-and-view-tabs-for-page/?p=45734
-
I think offsite in general is a bad idea - eventually something will break. I did think of the Github option, but seemed wasteful to put images in with the module files and hackish to put them in a separate "pw-screenshots" repo. Hopefully Ryan will chime in with a better solution!
-
Well in the first example you pointed to, horst is hosting the image on his own website and the second example is from Ryan. He is hosting it in the assets folder of the modules directory, but I don't think the rest of us have that option - at least I don't see it when I try to edit one of my modules - maybe I am missing something?
-
foreach($page->children("sort=DMCContact_Country") as $child) { $class = $page === $child ? " class='on'" : ''; if($child->DMC_represented!=0) { echo "<li> <a$class href='{$child->url}'> <span class='label label-default'> {$child->DMCcontact_Country}</span> {$child->title}</a></li>"; } }
- 1 reply
-
- 1
-
-
Often the "documentation" for third party modules is in the first post of the associated forum thread. Sometimes this is very similar to what's in the Readme file or in the text in the modules directory, but often it is much more detailed. That would be my suggestion for you at the moment, but I would agree that all module authors should do a better job of ensuring the text in the modules directory entry is more complete. Actually thinking about this, I think one of the problems is that the modules directory doesn't support images at the moment so we can't add screenshots here whidh is why I tend to think of the forum thread as the main spot for documentation. Ryan - any chance we could add support for images in the modules directory?
-
I assume you are talking a front-end form using the API? You can make it transparent to the front end user. Have your form processing code save the page using whatever field you want for the title/name of the page, then $newpage->save(), then process the rest of the form fields including the file upload and then save again. Does that make sense?
-
Thanks for the feedback guys - I hadn't tested thoroughly yet, although maybe the size of the .app file should've rung some alarms - pretty huge for a text editor!
-
You just have to change the Label Field from Title to Name and you'll be good!
-
Thanks for giving me yet another tool to try Just when I was thinking about switching from ST to Brackets I have another option to try. Have you guys seen this: http://blog.brackets.io/2013/05/31/better-javascript-debugging-with-theseus/
-
I just set up a page field with parent of Admin > Access > Users and it works fine. Do you get that error when saving the field in the admin, or a page with that field on it, or saving the page via the API?
-
But not easy
-
I think we were at least all on the same track regarding the issue with id and %= On the either / or issue - I really can't wait for this, it is one of the very few things in PW that are sometimes a cause of frustration because it not only feels dirty combining more than one page array, but also because of the issues regarding pagination when you do end up doing that. Nice examples there teppo
-
Thanks for the link teppo, but none of the examples that David or myself have posted here are of the either/or ilk. Just to spell it out, id|name=1|about would be the same as: WHERE id=1 OR name=1 OR id=about OR name=about An either/or would maybe be: WHERE (id=1 AND name=home) OR (name=about) It's late here, so maybe I am not thinking straight, but I think I am on the right track? That said, I am not exactly sure what David is wanting to achieve with the a|b=c|d style selector. Maybe he is after an either/or, even though that's not what it currently does. I actually don't think I've seen this style documented anywhere either, but maybe it is just assumed to be obvious based on what else you can do. I might sign off now before I confuse anyone else
-
No problem. PW is incredibly flexible - more so than probably any other CMS/CMF, but it does require that you learn at least some basic php. Mostly foreach and if/else will get you going. I would definitely recommend googling a few tutorials on the possible options/rules for these statements so you can better understand the syntax. It can seem a little confusing at first, but once you get a handle on the basic rules, it really is pretty easy!
-
Not exactly sure what you are still having problems with, but this line: if $page->parent->name=categories { needs to be: if($page->parent->name=="categories"){ Same goes for the years if statement. Does that fix things for you, or are there other problems?
-
I thought that too, but then I noticed that: id|name=1|about returns Home and About and: id|name=1001|about returns just About. Is it possible that Ryan has introduced partial/unannounced support already, or am I missing the point?
-
To be honest I haven't actually used that module until now. I am also having issues with the selectors you are trying, but the following all work fine: path=/about/ id=1,path=/ path%=/about/ I think it is logical that %= wouldn't be supported for id, although I can see the issue when you're trying to combine OR's like that. Not sure if that really helps, but I am sure Ryan or someone else more familiar with that module will chime in soon.
-
You need to install the PagePaths module which is included in the Core, but not installed by default. http://processwire.com/talk/topic/4874-what-does-page-paths-module-do/
-
2.4 should probably still run on 5.2.17, just not officially supported. http://processwire.com/talk/topic/5543-processwire-24-possible-to-run-on-php-533/?p=54099 Maybe try contacting renobird (from that post) about his setup with 5.2.17. Also, this from Ryan: PS You can always get an older release of PW here: https://github.com/ryancramerdesign/ProcessWire/releases
-
It really does sound like PDO isn't running on your server. Have you double checked your phpinfo output or done a php -i from the command line and confirmed that you see something like: PDO PDO support => enabled PDO drivers => sqlite, mysql pdo_mysql PDO Driver for MySQL => enabled