-
Posts
526 -
Joined
-
Last visited
Everything posted by Gazley
-
>And I think not spitting out class="" That has happened in "dev" code where the class name has been specified in the config array without a value. Obviously, that wouldn't happen on a live site and indeed, the site in question is not live (yet). >I love Selectivizr. Actually, the CSS I needed was "first-of-type" and according to the Selectivizr documents, they don't provide support for it with jQuery. Either way, I don't think it's a bad thing to be able to target the ordinal first/last <li> from the paginator. Whether its used or not is down to the individual.
-
@SiNNuT - I modified MarkupPagerNav.module last night to have the following additional options: 'initialItemClass' => 'MarkupPagerNavInitial', 'finalItemClass' => 'MarkupPagerNavFinal', In my output code, I now get the following CSS: <nav> <ul class="paginate"> <li class="active first"><a href="/ProcessWire/gallery/ladies/">1</a></li> <li class=""><a href="/ProcessWire/gallery/ladies/page2">2</a></li> <li class="next final"><a href="/ProcessWire/gallery/ladies/page2">Older »</a></li> </ul> </nav> This gives me what I need to have a known class value for ordinal first/last <li> irrespective of what their "native" PW class values are. I will send my changes over to Ryan to see if he wants to include them in the module.
-
Thanks Soma. So would I be correct about PW not being able to apply some kind of final item class?
-
Hi there, The last item on the first page of paginated results shows the "Next" label showing the <li> class value as specified for 'nextItemLabel'. This is good except that my styling is unable to target the last <li> in the <ul>. In other words, I would like to have two classes applied in this case; 1) the value of 'nextItemLabel' and 2) some value to indicate this is the final list item. This example is where the 'limit=2' and there are three entries. When I click on "Next", the UL is now on the final item in the UL but this shows the value of the 'currentItemClass', in my case 'active'. I want to be able to target the item not only as the 'active' item but also as the 'final' item. IOW, the final item has a class of 'currentItemClass' on the page1 and 'currentItemClass' on page2. Just to be clear, I am aware of the 'lastItemClass' but this only applies when there is a 'last' button showing and on this occasion, it isn't rendered. The reason I want to understand which is the final item is so that I can style it without having to rely on the CSS lastchild() method that has somewhat patchy support in older browsers. Any ideas or suggestions welcome! Cheers.
-
Thanks guys! I already have a Linode and have had zero problems with it. On saying that, if I had have, I would have been pretty much on my own with server related issues so the backup described from servint may be worth paying for.
-
Hi everyone, I am hoping to take a PW site live in a few weeks time and wonder whether there are any recommendations around hosting providers? I currently develop/maintain the old site being replaced by the new PW version and I host that on a Linode VPS using Gentoo/Nginx. It's fast and I have control but I wonder whether there are alternatives where I wouldn't have to do as much (in terms of LAMP configuration and maintenance), yet still enjoy control and performance? For the PW site, I'm going to stick to a traditional LAMP stack and may introduce Nginx "down the line". The Pagodabox/PHPFog offerings look quite interesting but I don't know that much about them. Any opinions would be very welcome! BTW, the site is UK based. Cheers!
-
Specify page query target with "unspecified others"
Gazley replied to Gazley's topic in General Support
Hey Soma, Of course I'm into Albums, it's a photography site! Sweet dreams, and don't think about this too much Cheers! -
Specify page query target with "unspecified others"
Gazley replied to Gazley's topic in General Support
Maybe I could set a sort-order value at run-time where the special case gets the highest sort value? In that case, the pagination should work in the usual way too. Sound reasonable? -
Hi there, Normally, I when I need to query pages by a specific category, I am quite happy for the natural returned results subject to the limit parameter, in this case limit=4 I have come across a special case where I want to specify that one item of the four equals an exact identity and that the other three values can be anything. Here is the usual case: $albums = $pages->get('/albums/')->find("categories_selected=$page, limit=4"); This is the special case that returns a single targeted album: $albums = $pages->get('/albums/')->children("categories_selected.name={$albumSegment}")->find("name=$albumName"); What I want is a combination of the two queries where one of the initial 4 returned values is the value of the second query. Any further paginated results should obviously exclude any of those (including the special case) in the original 4. On first thoughts, it seems that I might need to do two queries and append the results but I thought I would ask and see if I'm missing something obvious. Many thanks.
-
Hey Tim, Welcome to PW!
-
@Pete - I'd be interested in something like this in UK. I'd love to use PW full-time so, a developer list might be a great way to pick up some business as well as reassure potential PW end-user/customers. Do you work for yourself with PW? Cheers
-
@WillyC - I am sooooo happy now, it makes me want to cry, again <sniff> Thank you
-
@WillyC - I have no avatar either <sniff>
-
Thanks for the further clarification Ryan.
-
@SiNNuT - so you didn't like it then?
-
Tried here (UK) and it all seems to load really well. No noticeable speed problems.
-
@diogo - I'm working on a photography site right now and am doing something quite similar. The approach I outlined seems to work OK for me but doubtless, there are other (maybe better) ways of resolving this requirement. Either way, sn4ke seems happy enough Cheers!
-
Hi there - I think you need to go to the template for holiday-2012, select URLs and then tick "Allow URL segments". You can then simply add the image name as the first URL segment and test for that in your code. If this isn't clear, let me know and I'll find you a code sample.
-
With regard to your original suggestion, does the link's href get resolved at run-time or by selecting the target page in TinyMCE, does it just literally embed the path as a string so, no dynamic find() call at runtime?
-
OMG! That's fantastic! Thanks for pointing it out to me
-
Hi there, I want to link to pages in the site from within TextAreas (eg: Body copy type fields). In code, I might output a link using a $page->url value. I've seen the PageLinkAbstractor module and whilst I superficially understand what its use-case is, it doesn't seem to be for exactly what I'm trying to achieve. I think I am wondering how I can simulate getting the results of a page find() into a link without having to manually type the href value into the HTML. If it's a manual process and that's how it's done, then so be it. However, if there is a best practice around this, I would be keen to understand how others link to site based pages from within site-copy text areas. Thanks!
-
Hi there, Thought this was quite interesting and wondered what you thought of the system and concepts. https://www.newfangled.com/conversion_management_system
-
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