-
Posts
529 -
Joined
-
Last visited
Everything posted by Gazley
-
Hey Soma, Writing out the data using PHP works really well! -- thanks a lot!
-
Hi there (hoping Soma's in a good mood) I now have my images available via paginated pages fully available to Google. Happy days! Now, I want to enable Fancybox so that the whole gallery of images can be access form the same page, if the users prefers that. Here are some thoughts around approaches that I have considered : Fancybox allows you to specify an array of values at run-time that consist of image href and title values. This is preferred because I don't want to create a bunch of links on the page. This means that when I am generating the available Albums page that lists the albums that the user can see, for each Album, I will need to record/render each image URL (and any other data) for the collection of images in the Album, for as many Albums appear on the page. Whilst I am familiar with Javascript, I am not that familiar with jQuery (I've been doing JS before jQuery and Ajax emerged). I wondered where to store this data and looking at the jQuery docs, it seems that I could use its .data() method and store the data associated to each Album's link or teaser thumb img. Does this sound a reasonable way of storing the data? The idea being that if the link or image is clicked, I could build the Fancybox config array/object and then load it. I was also thinking that I could write out the values in PHP in the document.ready handler so they are handled when the page loads which might not need any storage because the handler and it contents would be generated via PHP. The other way that I have considered is doing some kind of callback to PW (maybe using Ryan's new Web Service module) and query these image details when Fancybox is called. I've found this posting http://processwire.c...wire/#entry1498 by Ryan and wondered whether this is all I need? I couldn't find any examples of the client-side Ajax call to return json from the page (just spotted it in the post) I wondered what PW best practice around this might be and any recommendations you might have for loading Fancybox using its array/object based configuration options. Thanks.
-
>Must have been very complicated if you already got it wotking? It was very, very complicated but made easy by excellent peer support
-
Soma - it's working beautifully; thanks!
-
Phew!
-
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.
-
Phew - it's as complicated as the thread looks. I thought I was just being stupid.
-
site:processwire.com dynamic page creation site:processwire.com pagination I didn't see it
-
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!
-
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
-
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!
-
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.
-
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!
-
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!
-
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.
-
Thanks Guys!
-
Apeisa. Thanks for that clarification; it's good to get the skinny on this!
-
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?
-
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
-
Sorry! $matches = $pages->get('/galleries/')->children("categories_selected=$category, private=0"); does the trick!
-
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.
-
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.
-
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.
-
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