Jump to content

mike62

Members
  • Posts

    30
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

mike62's Achievements

Jr. Member

Jr. Member (3/6)

8

Reputation

  1. I'm already well past the budgeted time on this project, and firmly in Good Enough, Move On territory.
  2. @kongondo @adrian I tried upgrading, unfortunately. See here if you want the whole sordid story.
  3. Cool thanks! I also just discovered that I could have just been using: echo $settings->store_hours_content; without even needing to use $pages->get(1006); Is there some way that the Website Settings page (1006) has been defined as some kind of global $settings variable?
  4. Thanks @adrian! That helped me track the problem down. Turns out there are two fields on this site for store hours, for some reason, and the one I needed was store_hours_content, not store_hours. :S I wish there was a way to see the field name when you're editing the page itself, rather than having to dig through the Templates and Fields areas of the backend. Anyway, chalk this one up to user error. :/
  5. It's PW v 2.3. I checked the publish settings, and it was set to "Hidden: Excluded from lists and searches". I tried unchecking that box but I still get a zero. The id for the page is right in the URL when you're editing the page, right? This is the URL when I edit that page: /admin/page/edit/?id=1006&s=1 Yeah, it's really weird, because like I said, I'm already using the exact same technique to echo a field from the homepage, but it's not working for this other page. :S
  6. I'm trying to echo a field from another page, in my footer. I have a Website Settings page (id 1006) with several fields for general site settings, like store hours (field is named store_hours). In the footer, I have this: <?php $settingsPage = $pages->get(1006); echo $settingsPage->store_hours; ?> Shouldn't that output the contents of that field? Right now it's printing a "0" (zero) on the page. Elsewhere in the same footer template file, I have this code and it works fine: <?php $homepage = $pages->get(1); echo $homepage->body; ?> Does it have anything to do with the fact that the field is organized into one of these tabs, at the top of the page editor? (disclaimer: I'm new to PW, and have inherited this site from another developer; that's why I don't know how or why some of this stuff is set up the way it is). Thanks!
  7. Thanks everyone for all the tips! Some notes: The screenshot I took shows the image *in PW* on the left (I clicked on the thumbnail in the backend and it opened the lightbox; that's what you're seeing there). So yes, that is a direct comparison of the uploaded image, to the resized image. Looks like ImageMagick requires PW 3.0.10... The site I've adopted is a mess of old modules, and I can't update it past 2.3.0. But... good news! I tried downloading the original image, opening it in Photoshop, using their legacy "Save for Web" export dialog, making sure it's set to sRGB, re-uploaded it, and bam! Thanks @Robin S!
  8. Please see attached screenshot. The image on the left is the original image that was uploaded. The image on the right is what it looks like after it was resized to fit into a template by ProcessWire using <img src="<?php echo $featured_image->size(854,0)->url ?>" /> This is a significant loss of color for these images. Is there a way to prevent this from happening — other than forcing client to crop the images to the exact dimensions ahead of time, and not resizing with PW?
  9. You're right, @AndZyk. I tried putting it after the relevant slider code, figuring that would be enough, but when I dropped it right down to the end, it started working. Thanks!!
  10. Thanks @AndZyk and @dragan. I've updated jQuery to 1.11.1, and the code to be: <link rel="stylesheet" type="text/css" href="/site/templates/scripts/slick/slick.css"/> <script type="text/javascript" src="/site/templates/scripts/slick/slick.js"></script> <?php // if (count($page->home_header_image) > 0): ?> <div class="home-featured-image slick-carousel"> <?php foreach($page->home_header_image as $image): ?> <div class="slide"><img src="<?php echo $image->size(1280,420)->url; ?>"></div> <?php endforeach ?> </div> <?php // endif ?> <script> jQuery(document).ready(function() { jQuery('.slick-carousel').slick(); }) </script> Now it's telling me that slick is not a function! TypeError: jQuery('.slick-carousel').slick is not a function. (In 'jQuery('.slick-carousel').slick()', 'jQuery('.slick-carousel').slick' is undefined) Seems weird to me, because the slick.js file is definitely being loaded... :S
  11. I've implemented Slick sliders on WordPress sites many times, but I've never had this error before. The site is here. The template code I'm using is: <link rel="stylesheet" type="text/css" href="/site/templates/scripts/slick/slick.css"/> <script type="text/javascript" src="/site/templates/scripts/slick/slick.js"></script> <?php // if (count($page->home_header_image) > 0): ?> <div class="home-featured-image slick-carousel"> <?php foreach($page->home_header_image as $image): ?> <div class="slide"><img src="<?php echo $image->size(1280,420)->url; ?>"></div> <?php endforeach ?> </div> <?php // endif ?> <script> (function($) { $('.slick-carousel').slick(); })( jQuery ); </script> The JS error I'm getting is: TypeError: $.proxy is not a function. (In '$.proxy(_.autoPlay, _)', '$.proxy' is undefined) As you can see, I tried wrapping the JS call in noconflict, but that doesn't help. What am I missing?
  12. The problem I'm having is not to do with the browser's cache. I am updating home.php, uploading it, emptying the cache, and I'm still not seeing the changes I just made. It's very frustrating. EDIT: It seems like the solution is to use this setting (see screenshot) for the template itself. Then to be able to see the changes I make: Upload home.php via FTP. In the ProcessWire admin, open the Home page and save it. Switch to Chrome and empty its cache. Switch to the tab with the site's homepage and refresh. Is this correct? Is this the most efficient way to develop a site with PW? Seems arduous at best.
  13. Ignore this (is there a way to delete a post in the forum completely?)
  14. Ah, ok I see the Cache tab on the Template page now. Thank you! (I'm getting there, slowly but surely...!)
  15. So, this isn't as "solved" as I thought it was. I'm still having caching issues, even though I've removed the Pro Cache module completely. On one browser, it's loading the most recent template files, but only when logged in, and it's still not loading the most recent CSS file. On another browser it'll load the most recent CSS file, but not the template files. It's making me crazy! Am I missing something obvious? This is making development extremely difficult.
×
×
  • Create New...