-
Posts
10,902 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
Hi kongondo, Thanks for testing. I should be able to do something for you along the lines of displaying the page names - I'll take a look. The error you are getting is an intentional protection when using the Create/Overwrite mode. Because this mode deletes all children and recreates them I check to make sure there are no other fields (other than title and name) that have content and also that there are no grandchildren that might be deleted. I guess I could add an additional config setting to allow this check to be turned off. Alternatively, the Edit mode will work fine because it won't affect other fields or grandchildren. I am thinking the config option would probably work well, but I am still worried that if this module is accidentally enabled on a template or page with lots of content fields, it could be very destructive without this check. Maybe it's just a case of the developer needing to be very aware of where they make it available. Do you have any thoughts on the best approach here?
-
Thanks for the kudos. Hope you enjoy it. I am hoping to get to those improvements that Steve suggested sometime soon, but just completely swamped here at the moment!
-
Glad to hear it sounds useful - please let me know how it goes for you and if you have any suggestions for improvements. I haven't had much real world feedback yet, so I would appreciate hearing your experience.
-
Yeah, no need to freak out, the admin.php that got copies across goes into the markup subdir, so it's all good Ideally it should have been installed into your Home as the parent, which would have created "blog" as a child of home. I would definitely suggest trying by moving blog to have home as its parent, deleting articles and then renaming blog to articles. I think this should work just fine. Let us know how you go. I probably need some detailed examples with this module that show just how the structure is copied and installed. That will come (maybe a video even) once I find some time to finalized things. Great to have you testing things though.
-
No offense taken. I have never been much of a curly brace guy - I was always into single quotes and concatenating. I know this goes against the general consensus of what's easier to read, but for some reason it seems more logical to me. You should also have a read of this post: https://processwire.com/talk/topic/4439-when-do-we-need-curly-brackets/
-
Or you can do: $carouselMarkup = '<div id="carousel-'.$carouselId.'">'; A period in php is a concatenator, same as + is in javascript. The advantage to this approach is that it lets you apply a function to the variable, like: $carouselMarkup = '<div id="carousel-'.strtolower($carouselId).'">'; And actually you don't even need the curly braces inside double quotes if you are using a simply variable. It's only if you trying to do something like: $page->id that you need the curly braces surrounding everything. So this would work just as well: $carouselMarkup = "<div id='carousel-$carouselId'>"; So, it's good to have all these in your repertoire.
-
I think probably the most important tip is to use google site search to search the forum, rather than the inbuilt IP.Board search which is often not great at all. site:processwire.com/talk "your search term" Obviously the quotes are always needed, but are a great idea when trying to search for an error message you might be getting.
-
upload bug with image field using inputfield-dependencies?
adrian replied to nghi's topic in Getting Started
https://processwire.com/talk/topic/4323-field-dependencies/page-5#entry45033 -
How to get the first image of a repeater from another page?
adrian replied to Zahari M.'s topic in General Support
Firstly, you shouldn't use "$fields" as this is a PW variable (http://processwire.com/api/variables/fields/) Even so, that shouldn't actually stop things working. The error you are getting with that code does point to the issue that Dave mentioned regarding the max files allowed setting for the repeater_image field. If that is set to "1" then you don't need, and can't use first(). Does that fix things? -
You should use the full migration option because you want the parent blog page, the categories and tags parents etc to be created. The blog.zip only comes with 5 posts, 2 categories, and 6 tags, so a full migration and then deletion of that content would be very quick.
-
File Description Not Saving for Multi-file Fields in a Repeater
adrian replied to DaveP's topic in General Support
Hey Dave, I don't have any problems here with the description field with PDF uploads in repeaters. I only did this for the first time yesterday actually and I am using a fairly recent dev version. I can't think of what might be causing the problem, but just wanted to chime in and say it's definitely not universal, or at least it has been fixed if it was -
How to get the first image of a repeater from another page?
adrian replied to Zahari M.'s topic in General Support
You can definitely use first within repeaters. Try this: foreach ($childpages as $childpage) { foreach ($childpage->repeater_a as $ra) { echo $ra->image_1->first()->url; } } -
I was kidding you know
-
Your assumption is correct - using get only works for getting hidden pages for that one page that matches your selector. After that you still need to using include=hidden when trying to get hidden children of that page. This is intentional and logical.
-
Wow kongondo - I have always thought of you as one of the most productive and prolific writers on this forum, but now I am wondering what's been going on - after seeing this, it seems to me you've gotten slack since coming over to PW. It's either that, or just that PW is so easy by comparison with MODx that a tome is not needed. Which is it ?
-
Russell, Really sorry about that - I made some significant changes to the form processing in the last version and it looks it was having some issues with session variables which is why it wasn't remembering the parent you selected. I have implemented a quick fix and tested the blog install at my end and it seems to be working fine here. I will revisit things properly before the next version, but please test the latest version from github and let me know how it goes. Thanks.
-
Hi Russell, Glad you'll find it useful. It's still a bit of a work in progress, but I hope to dedicate some more time to it shortly to get the final pieces in place. If I were you I would use the blog file included in this thread because it is already modified to work as a child page, rather than needing to be the home page. Then play with the css as needed, ideally taking the blog specific bits from the imported css files and putting them into your main css files and changing the paths in the template files to those main css files. No matter what you do you'll need to make some css changes to match your site. Good luck and please let us know how you go.
-
So as horst says in that post I linked to, 5.5.10 is your problem. You can either upgrade to 5.5.11 or implement one of the fixes he describes. These fixes will be available in the dev version of PW shortly: https://github.com/ryancramerdesign/ProcessWire/pull/445
-
Regarding the issue of images getting sized larger than original, go back to that documentation page and read about setting upscaling to false. As far as the blurry images goes, check out this post: https://processwire.com/talk/topic/6077-reduced-image-quality-of-images-added-to-image-fields/ and any of the links/advice from horst. It may be due to a bug in your version of PHP.
-
Please have a read through this: https://processwire.com/api/fieldtypes/images/ You must specify both dimensions if you use size. You are only specifying one. Otherwise you should use ->width or ->height instead.
-
The error is because you have ?options instead of $options
-
Sorry, in a bit of a rush, so not reading through your post well enough, but is it as simple as: $ordered = $pa->find("template=news, limit=25"); Sounds like you don't want to be finding from the full $pages array anymore, but rather your ordered $pa array?
-
Is anyone else still have this blank content issue. I tried Martijn's trick, but it didn't work. I ended up having to go with inline mode, which always seems to work fine.
-
The method on that page you linked to should work just fine, but obviously will need tweaking for a PageArray, rather than a WireArray of images. Show us the code you are using so we can debug that for you.
-
Adding permission to the Template doesnt reflect when user logs in
adrian replied to madhu1's topic in General Support
I guess I don't understand your setup, but it sounds like you have a field called page_role in a template that allows users to select a role when viewing a particular page? I think I also need to see a schematic of your page, template and field structure to understand what is going on. Maybe someone else can see what I am missing?