Jump to content

Gazley

Members
  • Posts

    526
  • Joined

  • Last visited

Everything posted by Gazley

  1. Soma - it's working beautifully; thanks!
  2. https://www.google.c...paginate images - jeez, it's right at the top #1 I know when you're angry - you don't talk, just refer I did look, I guess it's just the question you ask that matters. I'd figured out that the answer would probably be based around creating Page objects and that skewed my search terms. Sorry.
  3. Phew - it's as complicated as the thread looks. I thought I was just being stupid.
  4. site:processwire.com dynamic page creation site:processwire.com pagination I didn't see it
  5. Hi there, Looking for advice around an approach to a requirement. I have the following existing page paths: Gallery -> Category ---------- /gallery/ladies/ Albums -> AlbumName ----- /albums/jane/ /gallery/ladies/ will list as many album entries that are categorised as 'ladies'. The template supports pagination numbering. The link to the 'jane' entry has been formed as follows: /gallery/ladies/jane/ - obviously, in addition to the template supporting pagination numbering, it also supports URL segments. Here is where I need some advice. The album page 'jane' is only a single page but, it has an images collection that may have, say, 30 images. I want to turn jane's images into 'Pages', say, two images per page. Therefore, there are 15 "pseudo-pages". However, PW pagination works against find()'s that return PageArrays whereas in my case, it won't actually find 15 physical pages. The desired outcome would be: /gallery/ladies/jane/ /gallery/ladies/jane/page2 /gallery/ladies/jane/page3 /gallery/ladies/jane/page4 ... Is this possible and if so, any suggestions how to approach this? Thanks!
  6. Soma, I've done it your way, removing the field from Album pointing to the posting in favour of: $posting = wire('pages')->find("album=$album"); Works well and hopefully will be fast enough! Thanks for the suggestion
  7. When I tried "template=tmpl1|tmpl2|tpml3", I got entries from only one of the templates, not all of them. There's no issue. The pages aren't hidden - I'm probably not explaining myself very well. Thanks for your help with this. It's working well!
  8. I was referring to selecting multiple templates before I'd learned about PageListSelectMultiple. I understand that I don't need multiple templates now. I was just commenting on the fact that trying to AND template values seems to upset PW. You make a good point about not having to keep two Pages in sync with each other if the posting subsequently chose a different Album. Like I said, I figured that having the exact path of the posting available to the Album would make for speedier retrieval of data from the posting when listing the Albums. In the absence of a specific link from the album back to the post, PW would potentially have to search the whole site looking for pages that had a field that matched the Album - even then, it may not find any because the Album may be a general Album not linked to any post at all.
  9. Hi Soma, The posting *can* already select an Album that it's associated with. However, when I'm listing out the Albums, I want to include things like the post title and summary to give the Album some context. I realise I could query back to the postings to see if there is one with an Album of the same name. However, I figured (rightly or wrongly) that if I could specify an associated posting (from anywhere on the site) with the Album at design-time, at run-time, there is an exact path back to the associated post, resulting in a quicker search/retrieval. Thanks!
  10. Go Pete - you're the man! Thanks for that tip - it was staring me in the face. I picked asmSelect because that's what I'd used on other Page types not twigging that "Page list select" would let me select pages from a list! doh (clue's in the name) <blush> So awesomely powerful yet simple at the same time. I'm replicating stuff that I hand coded in this site first time round and it originally took ages. With PW, there's just some simple way to do virtually everything I previously custom coded. One thing that I did notice is that originally, I tried to used a custom selector so that I could specify multiple templates that the associated page(s) may be based on. I "discovered" that using "template=template1,template2" causes a PW error, when my intention was to simply AND the templates. It didn't crash using OR '|' but, it only returned data for one of the templates in the OR'd list. Is there a way to express template can equal multiple values? Cheers!
  11. Hi there, I have an Album page that represents a photo-album of images under a Galleries parent. Quite often, the Album is associated with some other event on the site like, a News or Blog post. I have created and added a Page field to the Album template so that I can associate the Album with its associated post, where one exists. However, the associated post may or may not share the same template. Even if it did, in the Album page, the new Page field just has a drop-down list of titles that will become too large to manage in this way. What I really would like to be able to do is pick the associated post in the Album page via a Page tree. Is there a way to do this? Thanks.
  12. Apeisa. Thanks for that clarification; it's good to get the skinny on this!
  13. Thanks guys - "hidden" is exactly what I want!? I took the following statement literally - " Hidden: Excluded from lists and searches" It most certainly shows up in queries which I took for "searches". In that case, I wonder what kind of lists and searches are not based on queries?
  14. parent & has_parent - cool. I looked at the 'Selectors' page before posting and completely missed these two gems! Thanks for pointing them out Soma; they are a very powerful addition to the querying toolbox
  15. Sorry! $matches = $pages->get('/galleries/')->children("categories_selected=$category, private=0"); does the trick!
  16. Hi there, I have the following query: $matches = $pages->get('/galleries/')->find("categories_selected=$category, private=0"); It actually returns the categories_selected Page(s) but what I want is the page that contains the matching categories_selected, in this case, the 'album' page. BTW, categories_selected is a Page field, the overall structure is /galleries/album. Obviously, I could get a collection of none-private albums and then loop round them checking for matching categories. However, I wondered whether this could be done in a single query? Thanks.
  17. The page is just used for a multi-select Page field for internal categorisation. So, it doesn't need to be published but I want it show up get()/find() operations.
  18. Hi there, I really want the status of the album-category page to be 'unpublished' but if I do that, the following doesn't work: $pages->get('/album-category/')->children Is this the expected behaviour? Thanks.
  19. Hi Soma, A very cool suggestion too. Having the ability to test for the type of request leads to these possibilities. I will have a good think about all of this! Thanks --Gary
  20. Hey Ryan, As to the SEO juice of a photo, it's basically in the image file name and the ALT text. Your second suggestion is the better one because it will render a page that has the image and the ALT text whereas the first one would simply get a reference to the unadorned image. Cool suggestions though - as they're not IMG tags, they won't instigate an automatic download. Nice trick! Thanks --Gary
  21. Hey Ryan, >As you are providing an alternate path by linking to them or linking to page(s) containing them, that's what you need. Having all of them on a site accessible "viewall" type page is an interesting idea although if this was left indexable by Google to gain SEO juice, it would probably be penalised because of excessive page load time (average number of images per album might be 40+) and there are a lot of albums in the overall Gallery. Unless, of course, the images were just "housed" in a series of pages where with only a handful of images per page which Google could find and index without the excessive page load time that lots of images would cause. In that case, some kind of slider control that provided a JS callback option to the site to load the next image would work well because there would be no browser discoverable img tags on the page to slow down the overall page load of the page containing the slider. So, a slider control with a JS API might do the trick. >It also doesn't hurt to get a site map in the mix. I've seen a PW module for generating a site map, whether it be XML or user-HTML, but an image sitemap might be an interesting challenge. Cheers --Gary
  22. Hi Pete, Thanks for your comments. What you suggest is pretty much what I did on the old site. I wrote the gallery control myself, it displayed the first image and when you clicked on the image or the buttons, it then pulled each subsequent image down thereafter. So, when the page is rendered, the images aren't specified in the markup. However, Google doesn't acknowledge the images either, so a big loss from an SEO POV. She doesn't like seeing a bunch of thumbnails like on similar sites where the idea is to click on the thumbnail and then load the larger image. I want the images specified in the markup but when the browser sees them, it will start downloading them despite the fact that they aren't initially visible. Thanks for the FacyBox recommendation. I will take a look at it. Cheers!
×
×
  • Create New...