Jump to content

landitus

Members
  • Posts

    181
  • Joined

  • Last visited

Everything posted by landitus

  1. I've upgraded a multi-language site from 2.2.0 to 2.3 and everything worked perfect!
  2. Hi! I'm currently working on a project that lists chairs. Each chair comes in multiple colors. Each chair has a repeater field with 2 fields: an upload a photo field and a select (which is a Page field) so you can associate the photo with a color from the select. From the Color perspective. Each color has been aplied to a number of chairs, and I want to have a page for the color "Red" and list all red chairs but show the red color image of that chair. So I need to find all chairs which are in red (this gets selected with another field but not inside a repeater). Then inside the loop I look for a repeater instance that has the color red. Everything good till the point I don't know how to find the photo adjacent to the color red. That is, the field in the same line of the repeater. I only need the full row which is the red thumbnail and leave the rest behind, I think I might be over complicating somehow... I'm really lost. Is this the right way? I guess this might be difficult to explain. Let me paste some code and an image for the Chair element with the repeater: $chairs = $pages->find('colores='.$page->name); $i = 0; if($chairs) { foreach($chairs as $chair) { $i++; $additionalClass = ($i % 3) == 0 ? " last" : ""; ?> <div class="item <?php echo $additionalClass ;?>"> <a href="<?php echo $chair->url ;?>"> <?php $chair_color_photos = $chair->producto_color_thumbs; // The repeater field. Contains rows with color names -> thumbnail $color_thumb = ''; // Find the red color name and photo if($chair_color_photos) { foreach ($chair_color_photos as $color_photo) { if($color_photo->producto_color_thumbs_opcion == $page) { // $page is Red $color_thumb = $color_photo->producto_color_thumbs_opcion; } } } if($color_thumb) { // Find the Red photo ?? } elseif($chair->producto_thumb) { echo "<img src='{$chair->producto_thumb->url}' alt='' />"; } echo "<hgroup class='descripcion'>"; echo "<h3>{$chair->title}</h3>"; echo "<h4>{$chair->summary}</h4>"; echo "</hgroup>"; ?> </a> </div><!-- .item --> <?php } }
  3. I also think the tree as a sidebar presents its challenges, both on the design and coding aspects. Also, it generates more noise on the page. The ability to toggle it helps a lot. I think this is those kinds of decisions that generate some divide and aren't easily reconciled. Take a look at this example by Squarespace. It doesn't look very scalable, I guess. But my point of view is that other improvements that are talked here are sure to generate more goodness and acceptance. Things like bigger text and inputs, for example, place more focus on the content, which is always a good thing. It won't change the general structure of the admin, but certainly make it better. Aspects like iconography and color are included in Philipps and Nico's proposal, which I like a lot. This would still maintain the admin's clean and un-bloated look, which is an asset in this case. The idea of "building blocks" is very appealing because PW is a really modular system and that philosophy should be taken into account in the UI. Bootstrap, Foundation and other CSS frameworks take this idea of building blocks into account and are good examples. Those look like good starting points and inspiration in my opinion (even if they are not used, the organisation is very good). I imagine every admin PW like a grid full of widgets that can be closed/opened and have different interactions (page selection, image uploading, text input, etc). The tree is a whole different beast and UI improvements are already present in Philipps and Nico's proposals. We even talked about some stuff here: http://processwire.com/talk/topic/4292-search-filters-and-options-for-the-page-fieldtype/#entry42038 In all, I'm happy there's a discussion about this topic!
  4. Great work Philipp! I agree that the admin experience for non-tech or unexperienced users is really important for any CMS. I think that while ProcessWire has a nice admin it could really benefit with some of the ideas you're trying out. I had the same thought about what makes Wordpress so famous and user friendly and ultimately the design of the admin has played a big part in it. I want to stress out that I have nothing against the core admin ( ), but I think It could still be improved to achieve a more modern look (whatever that means) and be more user-friendly, which for me is the top concern towards using PW in commercial projects. I really like what some people have done with themes and such, but I still always use the default one. I would be awesome to have some special place in the forums to talk about design of the admin (that ships in core). Mostly to talk about the actual user experience and the user interface, and posting ideas (and iterating) with the core team. I am thinking that some of these ideas would eventually make it to core and I can see my clients (and people in general) benefiting a lot.
  5. Yes there is! Take a look at your modules page in the admin and activate the Page Auto Complete module! Then, set up a new field and set it up as a Page type and the input to use the new auto complete field.
  6. I've been thinking more about the PageAssetSelect field idea and while I like it ( ), there might be some issues with PW way of handling page relations. Right know it's a Page -> Page relationship. Simple, effective. My proposed PageAssetSelect field could replicate this but with a visual UI for selecting the Pages. But, should it display the first image found of the Page? Should it make that assumption? Despite this, which could be a setting, it still would assume each asset lives in a single page. Even further, if it could show the user all images/assets attached to a Page parent and children (and repeater fields!), then there would be no assumptions. And, it would be more flexible in consequence. And it would take page relations to a whole new level. But the relationship would be Page -> Asset assigned to page. Is this an issue? Is this something that would class with PW way of handling data? Would it fit? I think I should wait for Ryan's opinion on this.
  7. yes, I was having this module in mind. Does it work inside a PageSelect input field? This module could be a start. But still, I'm striving towards a even more user friendly solution when dealing with assets (from other pages) while playing nice with PW philosophy. More ideas: Maybe the assetSelect or PageAssetSelect field has an option to restrict to a given page (like /shared/images/) and from that on, it presents the user with a modal window populated with all the assets attached to those pages and subpages. This is already in place with the current select input fields.
  8. I like Ryan's take on that problem, because it seems flexible and clean. The only issue is that the client or CMS user won't be able to see the image he needs, o even worse, won't be able to find it if there's not a descriptive page name. I've been have the same issues that @suntrop describes. I think some kind of visual queue would be more user friendly. The thing is PW won't guess anything about what's in you page (that's great) so it won't classify or make a distinction between a regular page or an image page. This falls somehow short in this kind of situations where you want to select an image page from an assets parent page and it will be hard (for the CMS user) to find it based on a select or text string. Maybe this kind of usage needs another kind of input field. Instead of an asmSelect (and multiple select), there could be an assetSelect, which could display images or uploads to a page in a modal window. Kind of what know Wordpress is using when selecting images attached to a post. I guess this doesn't contradict PW treatment of the data, but enforces the input field concept, which is more presentational and imposes a way of displaying/selecting data. From the distance this would look like an assets manager, but instead the input field turns any page into a an assets manager, without changing any data. Is this making any sense??
  9. I came across this Wordpress Plugin which has a similar feature to what I was referring. The ability to search/filter without leaving the tree looks useful. Check out the video to see it in action: http://eskapism.se/wordpress/cms-tree-page-view/ What do you think?
  10. Thanks a lot @Macrura! I can't wait to try it out!!
  11. I find that checkboxes are sometimes not the best tool for the job. If the one task at hand is selection, then a simple click on the row should select. It should be decided if on click the selection is confirmed and placed outside the table whee the selections are stored and sorted. I tend to always find an alternative to checkboxes! maybe something like ACF where the selections are side by side.
  12. Yes, I think that, like @bcartier says, sometimes all existing solutions fall short. And a combination of search/filter with and existing field type seems to fit best. I was thinking that in terms of usability, there are already some good examples to draw from. For example, the PageFieldSelect with Chosen or something similar, would work ok for both single and multiple selections ( as these are outputted outside the select). On the other hand, a data-table-like view of the pages sounds great as long as its not too over complicated and just let's you filter and select. I am seeing some big potential with those data tables to find and sort data, and this could be the case too! Maybe I could do some wireframing to check some of these options. I am more of a front end web designer and I could help with that.
  13. @Macrura, I really like what you've done with the products table. Are you using the Datatable module or just the js library with some custom code? I would really like to implement something like this as well.
  14. Hi! I was thinking that it would be great to improve and give more options to the Page FieldType. I was thinking the following: The Asm Select and PageListSelect could have more config options of how pages are listed, sorted and named (independent of those Pages' options). This could lead to list pages with different sort options to the ones defined in the parent page. I found that having the option to have a field image to represent the page helps a lot to link to page galleries. This is very custom and I understand PW is meant to be very open to how data is presented. A search filter of some kind (similar to ACF for Wordpress) could improve selecting pages in sites with many pages as well. This could apply to both Asm Select and PageListSelect as well. With Select, there's the Chosen implementation which looks good. Maybe I'm thinking too out of the box, but I think ACF relations widget (image attached) could fit into PW in a way that it can display pages in a non hierarchical way. Maybe listing all pages with template "X" could be shown this way. Pages with template "X" could be all over the Page tree and difficult to find and to sort. I am sure you've all heard of ACF for Wordpress which I think has some very cool ideas about fields as well. I think some parts of the UI are actually very good to handle content for clients and not tech-savvy users as well. What do you think?
  15. Ryan, this sounds great!! I'm glad you're working on it! BTW, do you think it would be interesting to have a module tutorial/process/dissection of some sort. Like, from the planning stage to the actual coding. Preferably a module that dwells into many aspects like this one (javascript, sessions, an admin process)? I know it would be time consuming but I think I've learned coding by looking at screencasts or reading at step by steps tutorials. That's just me cause I'm come from a design background.
  16. Hi! I was looking into learning to code a module for PW. I must admit I'm not very savvy with PHP, but somehow I can get some things done I was thinking about doing something simple, but something I would need for my projects. I came up with the idea of a Like button that would let any registered user to like a page. Maybe the module can have some configuration options, like the user roles allowed and which templates should get this functionality. I've made some quick evaluation of how easy/difficult this would be, and maybe it's too big of a task for me right now. Either way I wanted to share it with all of you. This is more or less the functionality I've laid out: A Likes.module with the main function "like($page)". A code for the button to place it where ever on the page template to trigger the like. A way to trigger this function via a jQuery call > This I have no idea how to accomplish. A configuration section for the plugin: Templates allowed and user roles allowed (maybe later...) An admin section inside Setup with a table that displays all liked pages. I've been struggling with how to accomplish this since I want to attach a "like" to a page but I don't want this to be a field displayed in the editor, since this is more like a metadata attached to the page, but not editable by the admin. I guess this is possible, right? Maybe someone can send me into the right direction. BTW, isn't this similar to the Recommend button down at the modules section of PW?
  17. This looks great! Can't wait to try it! Congratulations Adam!
  18. Awesome! I'll give it a try, thanks!
  19. Thanks Soma, I was not aware that there was a replacement in core. That sounds like good news! Does the LanguagePageNames plugin have the same features? I like the feature where all the URLs are modified with the current language. That's a killer feature!!
  20. The one ampersand printing as "&amp" correspond to the fields that have the encode htmlentities option selected. I guess that's who it's supposed to work. I am also using translations BTW. I was hoping that having the encode htmlentities option selected, the printed "&" would show as a "&" in the browser. It looks like because php renders the "&", it's shown as "&". Am I making any sense?
  21. I am interested in upgrading the plugin to the latest version. Is caching supported with the latest version?
  22. I've recently noticed that some of my pages failed the html5 validator because ampersands (&) were just printed as-is. I tried to set the field to "encode htmlentities", but the ampersand now prints as "&". What am I doing wrong? What is the prefered way to deal with this? I've been having the same issue with title fields, text fields and WYSIWYG fields.
  23. I was able to build this final working code based on your help. This code checks for language fields only so it's more safe. Thanks a lot!!! $langAlt = $languages->get("pt"); $langDefault = $languages->get("default"); $items = $pages->find('template=contacto'); foreach($items as $item){ $item->of(false); $fieldsSelected = $item->fields; foreach($fieldsSelected as $field){ //echo $field->type; if($field->type == 'FieldtypePageTitleLanguage' OR $field->type == 'FieldtypeTextLanguage' or $field->type == 'FieldtypeTextareaLanguage') { if($item->$field->getLanguageValue($langAlt)) { $title = $item->$field->getLanguageValue($langAlt); // get the alternative lang value $item->$field->setLanguageValue($langDefault, $title); // set the new value } } $item->name = $sanitizer->pageName($item->title); } echo $item->save(); }
×
×
  • Create New...