Jump to content

heldercervantes

Members
  • Posts

    388
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by heldercervantes

  1. I've been doing functions from the start, but more recently I've had a couple of instances where I go for a custom module. I can't really speak in terms of performance, haven't made any tests, but the module approach feels better when there's more than one or two functions, to organise everything more neatly. Example: I'm working on an online store built from scratch. In that project the server shoots emails all the time. On register, on purchase, on order status changes, etc. Each email has a template that can be edited in the CMS. It becomes complex having to handle multiple templates and usage scenarios, replacing variables, different results based on context, so turning it into a module made it much more organised. I guess for me it's about volume and reusability. If it's small stuff I don't bother.
  2. What you're attempting seems too specific. It may be possible to hack the module to use a textLanguage field for tags instead of the simple text one, but that's a bad idea. You'll lose the ability to update the module, and may screw up the API. I'd find another way around it, perhaps using a repeater to hold everything together. I can suggest 2 different approaches: 1. Alternative images field for the second language If you have a field called "images", and another called "images_de", while having a second language with the name "de", the API will automatically use "images_de" if that's the user's language. This will automatically filter all your content. Downside: You'll have to upload images twice. Not good if you want all images to appear on both languages, but then again I have come across the need to have images that appear on one language but not the other so... 2. Use a repeater to hold everything together Set up a repeater, have a field for the image, and a textLanguage for the tags. Downside: You'll have to code your own tags logic for whatever you're building in the frontend, and you'll have to upload images one by one. You do make a good point. If the images field with language support gets different fields for description, I'd say the same should happen to tags as well. Maybe you should add this to the wishlist section of the forum.
  3. I've been mostly a designer too. Up until the end of 2015 I was creative director and my coding days were more than 10 years behind me. I wouldn't suggest anything else. It's super flexible and the API is so straightforward that you'll need little more than to learn how to use a foreach loop in PHP to get on with it. You also have a great community willing to help in this forum, something that frankly I haven't seen anywhere else, coding related or not.
  4. Thanks for the correction @Robin S, have to admit I spoke off the top of my head on that one.
  5. Someone more knowledgeable than me may clarify the why, but it seems you need to combine start with limit. This is for pagination purposes, and it makes sense in that context. I guess it "could" assume an infinite limit by default, but as I said someone more knowledgeable may point out a good reason why it shouldn't. So just put a limit of whatever large number you feel comfortable and it should work. This code works for me: $pl = $pages->find('template=basic-page, start=3, limit=3'); Also, you don't need to set `sort=sort`, that's the default behaviour (see correction below). However if these pages you're grabbing are not children of the same page, you'll have a whole new problem to deal with.
  6. Hey Ben. The last site I built used that version of PW and I find no problem whatsoever running on Chrome in Windows 10. Are you and your client logging in with the same user? I forget to add permissions to the client's user all the time.
  7. Ah New Zealand... I want to visit so bad.
  8. Learning new is something that I do as I work on projects. On my down time I usually work on personal projects. Rethinking my personal site, looking for new opportunities... heck, the other day I found myself creating a text editor web-app, as if there weren't enough of those already, just for the fun of it. The idea is to keep challenging myself, so more and better things can come up in the future.
  9. It certainly does. This was my second one. I literally took the resources folder, view-sourced (just made that a verb) the old site, cleaned up the HTML and added fields to fill it in. More could have been made to improve the HTML and there's a lot in the frontend that I'd have done differently, but we wouldn't want this migration to cost as much as a completely new site
  10. Looks like I missed something moving to production. Thanks for the heads up.
  11. I'll need some time for that. Let me see what I can do.
  12. The idea is quite simple: You set up a repeater field with all the fields you'll need for each type of block. Title, body, images, single image... etc. You add another options field (I called it "type") and populate that with the names of the block types you'll need. For each other field (body, images...) you set up its visibility to show only when type is relevant. The result should be a repeater, when you add a block the only field that shows up will be a drop-down for type, and when you choose that, the relevant fields appear. Setting up a field's visibility: Adding a block before choosing type (ignore the other two fields, that's for something else): And after choosing type... From the template, I'm just doing a foreach that goes through the repeater, then use the type field to decide what "sub-template" file to include. That keeps things neat and separated. This can also be done with a RepeaterMatrix ProField, which simplifies this whole process. On a more recent project I'm currently working on I'm using that combined with field templates to achieve more or less the same effect.
  13. @Sérgio Jardim and I are gonna be there and decided a beer is in order. If you're going to be there, let's hang out.
  14. The title says it all, let's hang out
  15. I'm going too. Probably not the whole thing, I'm still looking at the program. I'm following you on twitter so we can contact at the time.
  16. Hello team PW! Here's another one, for the best Congress Centre in the world, in the most beautiful city in the world! http://www.ccalfandegaporto.com/en/ This site was initially developed in 2015 using a proprietary CMS from the previous agency. In late 2016 some changes were requested, new languages and a few tweaks, and I took the oportunity to migrate it in PW. Most of the frontend was kept, save for a smaller improvement here and there. As you'd probably guess, having used the proprietary CMS and jumping to PW, the client was blown away by the new admin area. Note that content translations are a work in progress.
  17. Yeah, it's become quite image heavy. This was initially published with temporary content (some 3d renders while the place was being restored), and now that the final photos are here and there's so much content, it makes sense to review the optimisation parameters. The map is just another image block they're adding from the CMS.
  18. Thanks for all the feedback guys. I'll certainly be doing some improvements in the afternoon.
  19. That's strange. Can't detect that here. What OS?
  20. Whoa, that's not supposed to happen. Mind telling me what you're browsing with? I hear you on the contrast. The super light font on the menu can be hard to read, but alas, I'm not in charge of design on this one.
  21. I forgot to add this one. Verride Santa Catarina is among the most upscale hotels in Lisbon, set in a historic townhouse in the heart of the city. http://verridesc.pt/ It's a modular design that allows pages to be built using a set of blocks the admin can customise.
  22. Now that you mention it... There's a video block that's missing now, still being produced. That will probably reveal a bit more.
  23. Here's a wee one, single pager, for a Foccacias place here in Porto that I can say is very good: http://rt.com.pt/
  24. Thank you @SamC It does have some problems, I am aware. It's an elephant to load and very experimental, so it's a bit rough. In fact, the engine (whitestormjs) was being developed as this site was implemented, with this site serving as a guinea-pig to discover issues, find missing features and whatnot. That by itself is a bit dangerous. The web is so volatile that instead of polishing too much, I'll probably wait until I have a couple more case-studies to add and cook up a new site with some fresh experimental stuff and a whole new set of problems
×
×
  • Create New...