-
Posts
6,798 -
Joined
-
Last visited
-
Days Won
158
Everything posted by Soma
-
You can't with the default image field add categories to it. I thought somebody was doing something to add creating a custom image fieldtype but can't find it currently. If you use repeaters, I'm not really thinking it all through and not sure this is the best way to go, it is possible. You then can create branch using a "category" template. Categories - Summary - Carousel Then you create custom page fieldtype "categories_selected" that has set /Categories as the parent and allow multiple pages. Then make the inputfield of the page fieldtype either checkbox or the asm select. Then after saving you see additional options depending on the inpufield. Now add that page field to the repeater or template you want to define categories. Then you should be able to select images using one or multiple categories. I'm not sure but it should be possible to select images (repeater elements) using ->find("selector") I haven't really extensively used repeaters yet other than little testing. You would have to test yourself. Maybe there's alternatives. $cat = $pages->get("/categories/summary/"); $images = $page->repeaters->find("categories_selected=$cat"); Thinking about alternatives: You could also create a image field called "image_summary" and use that, or create a image field "carousel" specially for carousel. Another option would be to create dedicated pages holding the image for a carousel and then make them selectable through a page field (same as with categories). Like a centralized repository of image galleries. Almost endless possibilities once you get the hang of it combine fields and pages.
-
Gazley, if you provide us with more details of what you want to archive we could help more finding good solutions. The concept of this is to create a set of pages under a tree branch using certain template or different templates. Then use rules/filters/queries (parent, template, etc) in a page reference field, to select from the set of pages through that page reference field.
-
Caching objects? For what reason?
-
YOu can use markupcache module. http://modules.processwire.com/modules/markup-cache/
-
Yes logo and tel# was jumping occasionally here also (no matter what browser). I took a look quickly and injected some css via php, now it should be good.
-
Thanks for the feedback. Thanks for mention, I actually tried to make it not jump (or at least minimize it), maybe on first loads it can happen, though otherwise I don't recognize any jumping. It's using js and cookies, and haven't looked at it since months but I think it's not easy as the logic is client side, will maybe have a look at it again soon. Yes, it is not really optimized for smaller and mobile screens.
-
You're welcome landitus. Unfortunately this seems not possible as I know, it is using the jquery UI slider and there's only numbers not floats supported. You could then maybe use 1-10 and divide them by 2? Or you could use page field and create 10 pages with the increments and then use them to select. If the range is never gonna change this might be a option too.
-
I thought I'd share a little project I'm working on. Launched the new website for a colleague that has a local cycling delivery service. It's very simple website and is an ongoing project, changing and adding stuff over time. As always it was very easy to setup in PW and he loves the admin to edit his stuff. Previously it was using Limbo and I refused to further use that horrible system. Now using PW it opens up a whole world of possibilities. http://velokurier.com
-
Not sure if there is a limit other than your hardware. Depends what those 5000 pages are doing but I see no problem at all even without cache. It's much faster than MODX. If you take care of what you do with queries in templates and maybe use partial markup cache for heavy queries I think you can do a very performant website within the hundred thousands easily only really limited on performance of the server PW is quite optimized. Anyway it has never really been tested how far you could go but I heard about sites in the twenty+ thousands and they still seem to be fine. Just recently there happened to be some issue with large scale when saving pages and already got more optimized.
- 12 replies
-
- 1
-
- performance
- page limit
-
(and 1 more)
Tagged with:
-
I'm not responding!
-
To be honest I have no clue. I never used it for that @wanze I store them in a separate folder where I have all PW modules. The local install is for development only, once it's good I copy files or code over.
-
A type page for a image? My bet would be that you see the repeater "page" as they're done as stored hidden pages in the admin branch.
-
Sorry I actually meant "I guess you see..."
-
I guess in the xcode debugger...? (will stop it now)
-
No, I'm reading too quick and post something, then read again, edit it again lol I'm not copying the next. I should know, sorry it happened few times already and I need to hold me back a little.. oink
-
ROFL apeisa!!! You spoiled it Almost felt from chair reading this
-
Sorry teppo!
-
You need to do. $page->reapeatname->imagename->url; Sorry maybe you already did? Also the x100 image is most surely from the thumbnail in the admin. Edit: If it's a multiple images field you have to iterate them or using $array->first()->url; it's in a array. $repeater->images->first()->url should then give the first image.
-
Out of interest, who's using Less/Sass vs plain old CSS
Soma replied to onjegolders's topic in Dev Talk
What Apeisa sais is also how I feel exactly. If you find yourself repeating over and over you're doing it wrong. I developed a style over the last 10-12 years where I need less and less very little CSS and thin code, it payed a lot and saved me a lot of time also from the experience of all the browsers and especially IEs. But lately it has and will shift with the whole new palette of browsers evolving, devices, displays, tv's (next?) bandwidths etc. I remember where we followed ~50kB rules for a page. And it would be still possible in that range, and we can use lots of new techniques aswell. Requirements are different now and I felt less or sass brings in what CSS maybe missing and I find it really refreshing having the possibility there if really needed. Not the big part maybe. I've been using it in some projects to try and was quite happy to be able to define some stuff and it really allows for very different workflows which is pretty cool if you think about it and play around with it. Not creating another dependency is I think the important part here. If a team really is trained to use a defined workflow and they have fun doing so it sure can help on really big and complex projects. -
Out of interest, who's using Less/Sass vs plain old CSS
Soma replied to onjegolders's topic in Dev Talk
Only... I lol as if it were something less. *sssssasss* -
I think I need a debugger to understand what you're doing. jk Not sure what your setup is exactly. Template in PW or php file? ...
-
My bet is you looked at wrong installation.
-
Out of interest, who's using Less/Sass vs plain old CSS
Soma replied to onjegolders's topic in Dev Talk
I use the .less apps http://incident57.com/less/ (mac, pc also is available elsewhere), that converts to regular CSS when saving (watching files), you can also set it to minify them. I'm not a fan of serverside or js runtime. It's basicly great tool to help using variables and mixins etc to write css. -
Not sure if slkwrm's code is really right but I guess. Can you also try if ($child->isHidden()) { echo "I'm hidden!"; } else { echo "And I'm visible!"; } Also take a look in mysql "pages" table and look at the "status" field what bit mask it has. I think there's something else involved we don't see or know here. For example how have you created the site, pages exactly are they imported? If they're marked as hidden in the admin it should really work in frontend. Have you other code in your templates that could cause this? Any special modules installed? There's nothing wrong with what you're doing at all.
-
It's "swiss made" quality!