Jump to content

mike62

Members
  • Posts

    30
  • Joined

  • Last visited

Everything posted by mike62

  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.
  16. Cool, thanks @SamC that's a good one to know. I ended up using the page field as @abdus suggested, so that each post can "choose" its own layout for the homepage. It's working well. o/
  17. @kongondo Thanks! I literally JUST found both those in the docs. Some things are hard for me to find in these docs. Is there a way to search *just* the docs, on the site?
  18. @abdus I've got this *almost* working... but I'm stumped with simply getting the sort order to be reversed, so that the newest post shows at the top. Also, can I easily limit this query to 4 posts? Thanks!
  19. I'm working on a page and it's showing up differently when I'm logged in. It's not that a field is set to private or anything, because it's still pulling data from that field. It looks like the "public" view is simply using an old version of the template (home.php), and the logged-in view is using the current version of home.php. See attached screenshots. Is there something that caches template files? Is there a way to force it to use the most recent version of the template? EDIT: I found the Pro Cache module and cleared it. That seemed to help. Thanks, -Mike
  20. aHA! Thanks! I guess I skimmed over those tabs at the top of the Field details screen.
  21. @kongondo The site was handed to me like this, and there's too much to rework to start from scratch, so I'm just doing a re-skin. @horst I don't need to update the site. Just mildly concerned about using outdated (and possibly not secure?) software. The below code now works great, thanks for the tip! <?php $image = $page->home_header_image->first()->size(1280,420); echo "<img src='{$image->url}' alt='{$image->description}' />"; ?> I had no idea that the "Image" field was for more than one image. I don't see a way to make a "single image" image field... am I missing something? I don't really need it at this point, since the code change works. Just curious. Thanks again!
  22. I am new to PW, and am trying to get an image to display, from a field in my template. Here's the code I'm using: <?php $image = $page->home_header_image; echo "<img src='{$image->url}' alt='{$image->description}' />"; ?> I'm following the tutorial on this here. When I save the template and reload the page, the path to the image is incomplete. If just echoes: <img src="/site/assets/files/1/" alt=""> It omits the name of the image, at the end of the path. Here's the site I'm working on: http://dev.delucaswpg.webfactional.com A couple caveats: I'm using ProcessWire 2.3.0 (tried updating the site and everything went berserk because of some plugin dependencies; point being: I can't update to the latest PW). I tried using the ->size thing and it gave me an error, saying it couldn't use 'size' in this context. Which I also thought was weird. Any ideas? Thanks!
  23. Ooooh wonderful, that's excellent to know. I likely won't use it for this site, because they want the layout to remain the same on the homepage, and have the content just flow into it, but good to know for the future. Thanks!!
  24. I'm new to PW... I'd like to have some blog posts displayed on our homepage based off the attached mockup. I want each post to use a slightly different layout. Is this possible?
  25. Thanks Dave! I really appreciate all your help. I may be back... just might be tough working on PW 2.3 and Spex 0.2... Hopefully I can muddle my way through. :S
×
×
  • Create New...