Jump to content

bcartier

Members
  • Posts

    107
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by bcartier

  1. Hi everyone, I'm trying to build an Inputfield module to provide an alternate interface for creating multiple page references. I'm trying to access the "Selectable Pages" settings for the current field within my module. Does anyone know how to access those settings using the PW API? I'm specifically looking for: - Parent of Selectable Pages - Template of Selectable Pages - Custom Selector - Custom PHP code to find selectable pages These settings are found in Setup -> Fields -> (fieldname) under the Input tab. Really appreciate any insight anyone might have... Thanks, -Brent
  2. Good call diogo! Ideally the admin theme should be shared too. Maybe something more like this then: /wire/ /shared/ /modules/ /templates-admin/ /site/ /site-example1/ /site-example2/
  3. Thanks gentlemen. Ryan - would it be difficult to add a shared modules directory that ProcessWire could be configured to look for? Something like: /wire/ /modules/ /site/ /site-example1/ /site-example2/ Perhaps you could add a preference in "/index.config.php" , since that's where you'd set up the domain routing for multiple sites anyway? That way, the default single-site install doesn't have the overhead/complexity, but a multi-site install could take advantage?
  4. I'd like to symlink the /site/modules directory so I centrally maintain them for multiple sites, but there are path issues with doing that - particularly with multi-lingual sites, I think. If I'm careful when upgrading ProcessWire (only overwriting core modules in wire/modules when upgrading), is there any other disadvantage to putting common modules used by all sites into the wire/modules directory in a multi website setup? I'm using the 'separate database per site' method. Thanks for your help, -Brent
  5. Hi Ryan, Could I make a humble feature request for ServicePages? I'd like it to support subfields in the queries. For example, I have a template called program that has a PageReference field named regions. Then, I have a template called regions that has a field called code. I made sure that both templates and the fields involved were allowed in the ServicePages config screen. I'd like to use a selector like this (which works in Batcher and Selector Test modules): template=program,regions.code=35,title|body*=Export which in the URL would be: ?template=program&title%7Cbody*=Export&regions.code=35&debug=1 But I'm getting the error: "Field 'regions_code' is not allowed in queries" It works fine, of course, if I substitute regions.code for regions=124 (where 124 is the id of the Regions page that has a code value of 35). It seems like the field sanitizer is renaming regions.code to regions_code instead of sanitizing both the parent and child fields to make sure they're both allowed in queries. I'm using Page references for all kinds of metadata, so to efficiently use ServicePages, it would nice not to have to rely on knowing the child page's ID. I could see this being used as 'parent_field'.title quite often. I guess having "." in a URL parameter name might be problematic - maybe we'd have to use ":" instead? Thanks for a great module! -Brent
  6. I have several sites where existing InputFields for Page fields won't quite cut it. (asmselect, page autocomplete, etc) We have good options for searching by keyword (page autocomplete), good options for browsing (asm, page list select), The part that's missing is the combination of search and browse together, where you get more than just page titles as a result and where it's easy to select many results from the search. I'd like to build something that returns a grid of results, each row with a checkbox, with an option to select all, and the ability to shift-click and ctrl-click to select multiple items. There must be a jQuery grid that would be suitable for that. Maybe a read-only handsontable that kongondo and wanze are working on.For the search field part, I was thinking it would default to a normal keyword search, but would detect and accept a PW Selector string to get really granular results. landitus - does that sound like it would meet your needs as well? Any other ideas?
  7. That's great news! I'd love to see the Handsontable class implemented as a read-only InputField for Page Reference fields (as an alternative to AsmSelect etc). It would be great for searching and multi-selecting pages for references - specifically when there are tons of potential pages. ...lots of possibilities with this one.
  8. Great discussion! It's always interesting to hear how others are approaching similar issues. I agree with Ryan. In the vast majority of sites, I would only use Hanna codes for the rare exception, rather than building out a site using them. The page-builder idea was born of the necessity for a high level of content re-use, and to provide more editorial control across thousands of pages on a large site. Editors didn't want to have control like MS word, but wanted to be able to combine inline static text like (limited RTE in this case) with dynamically generated blocks of content. In our case, maintaining visual consistency, cleanliness of code, and ease of maintenance, were actually our top reasons for using the Hanna code approach. -Brent
  9. I've built a prototype page builder using Hanna codes. I create Hanna codes for different types of content blocks that you might want to display inline, inside of a RTE field. Don't forget that you can pass attributes to your Hanna code, which can be PHP and have full access to the PW API. In my example, I might have "Products" template with a bunch of categorized products, and I could set up a Hanna code called "product_list". The Hanna code accepts a parameter called 'filter' which is used as part of a PW selector in the product_list's Hanna PHP definition. This filters the products to display. Then a content editor could create something like this inside the RTE: Tortor Tristique Donec sed odio dui. Donec sed odio dui. Sed posuere consectetur est at lobortis. Etiam porta sem malesuada magna mollis euismod. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam quis risus eget urna mollis ornare vel eu leo. [[product_list filter="color=blue,category=t-shirt,limit=5" ]] Vestibulum id ligula porta felis euismod semper. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas faucibus mollis interdum. Aenean lacinia bibendum nulla sed consectetur. Etiam porta sem malesuada magna mollis euismod. Donec id elit non mi porta gravida at eget metus. [[product_list filter="color=red,category=hat,limit=5" ]] Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Nullam quis risus eget urna mollis ornare vel eu leo. You can get very creative with this approach. For example you could also add a parameter to your hanna code called 'display' which accepts "ul" or "ol" to change the type of HTML list the Hanna code would output. Or maybe it shows just linked product titles by default but you want the option to show a short description with each title, you could can add a detail parameter of y/n to display the appropriate level of detail for a particular list. The possibilities are endless. I also recommend providing brief help text in the RTE to let editors now what Hanna codes are available, and what the acceptable parameters are. It's pretty amazing, really.
  10. Feature Request ;-) It would really handy if the Batcher url under Setup was resource-oriented and stored the submitted Selector in the URL. That way you could bookmark the selectors that you reuse most often, or share very specific lists of content to team members etc simply by sharing a URL. -Brent
  11. Hi kongondo, This is awesome! I would love to see a filter for the table that would accept a standard PW Selector rather than just a drop down for Templates. That would allow you to combine multiple templates in a result set, or get as granular as you need in terms of searching large data sets. Great work!
  12. I love this module too! I noticed that it doesn't seem to list Page References created inside Repeaters. That would be a nice addition. -Brent
  13. Hi Alevine, One way to accomplish this would be to use Ryan's Hanna code module. Set up a Hanna code, let's say "output_pages" to accept a selector parameter and output what you need. Create a text field that contains the Hanna code and the parameter like [[output_pages match=template=basic_page]]. Hope that helps, -Brent
  14. This is great stuff! I'd love to see some additional detail about how you managed images, topics, tags and assigning authors. I have a few big sites to migrate. I'd also love to see your take on managing page references for related content, if applicable. Thanks for sharing! -Brent
  15. It's actually Safari I'm having trouble with - Chrome is fine.
  16. Hi apeisa, Fredi is fantastic! Thanks for sharing this. I've been using it with Chrome. I can't seem to get it to display the form in Safari though...(v6.0.4 on OS X). The modal shows up, and expands to the right size, but no form shows up - just the spinner. The form is there in the source code (within the iframe), but it isn't displayed. Maybe it could it be the z-index or maybe a source-order issue with the modal? Thanks again! Edit: forgot to mention - no javascript errors appear in the console
  17. I think this is a great idea. I agree that the Page List is great, but an alternate way of finding pages would be a really handy option for larger sites. It would be nice to be able to choose which custom fields to show in the table view (chosen per template) and be able to filter the table on multiple criteria. In addition to custom fields, I suppose standard criteria drop-downs for criteria like Template, Published/Unpublished etc could be made available. I'm thinking this could work well if criteria could be added how an email client typically handles email rules. Add criteria one at a time to build a powerful search. In the ExpressionEngine world, there's a really good module called Zenbu (http://zenbustudio.com/software/zenbu) that works this way. -Brent
  18. Thanks Joss, It still feels a bit 'lumpy' based on the free trial I signed up for recently. But I do like the idea of a one-click PW site creation and deployment...
  19. Has anyone had any experience hosting ProcessWire (or anything else) on Jelastic? http://jelastic.com It looks like a great way to deploy and host PW sites... -Brent
  20. Bringing Wanze's small change into the module works for me ;-) No settings!
  21. Thanks Wanze! That's really helpful. The ProcessWire community comes through again!
  22. I'm running into a small issue with the Thumbnails module where a client is uploading an original image which has the exact dimensions of the configured thumbnail size for the CropImage field... It's a case where the client knows the image dimensions used on the website, and tries to upload an original with the right dimensions (even though he doesn't have to) ...but he doesn't know enough to compress it. Strangely, the thumbnail is created as normal (I can use it in my templates), but compression is never applied if the dimensions of the original match the thumbnail dimensions. So we're ending up with a lot of bloated jpegs slowing down the site. It works fine, of course, if I click the 'thumbnail' link to custom-crop the image (with the jcrop interface), and just select the whole image as the cropping zone. But I don't want the client to have to do that. Better to just drag the file into the field, save the entry, and let ProcessWire work it's magic ;-). Can I somehow tweak the module to force the compression of images in this case? Any pointers would really be appreciated... Thanks for your time, -Brent
  23. I ran into this when working with a git repository - I had mistakenly git-ignored the cache and session folders rather than their contents. So, although I had set 777 permissions to config.php and recursively to the assets folder, the /assets/sessions and /assets/cache folder didn't actually exist. I created them and set permissions and all was fine, except my feeling a bit silly ;-)
  24. What would be required to get symlinks working for translated modules? Is it something that can be resolved? Have hard symlinks worked for your setups?
  25. Thanks Rob, I'm really looking forward to the addition of the saving over the original. Great work! -Brent
×
×
  • Create New...