Moving Site - Having issues with images attached to Designer Content dropdowns
Permalink Browser Info Environment
I've moved a site to a new server, and images that I had called out to for the drop down menu in designer content are no longer linking. I've inspected the element and typed in the proper new path, which works. I've entered the new path into my view.php for that block, but it's not finding the image. It looks like it's not even calling out for one.
Any ideas?
Thank you -
Any ideas?
Thank you -
Type: | Discussion |
---|---|
Status: | New |
Sorry, I do not understand what exactly you are asking. If you could post the code from your view.php file, I might be able to help.
Here's the view.php code. My problem is in the field4 values. It's supposed to load an icon graphic depending on which selection you make. It works fine on the developed site, but when I port it over to the new server, the icons will not load. You'll see a couple of different path locations I've tried.
<?php defined('C5_EXECUTE') or die("Access Denied."); $nh = Loader::helper('navigation'); ?> <style> .homepage-box {margin:20px 0; padding: 3px;} .homepage-box-content {background-color: #00baf1; color: #fff; font-family: 'Economica', 'sans-serif'; min-height: 375px;} .homepage-box-title {text-transform: uppercase; text-align: center; margin-top: -25px;} .homepage-box-title h1 {color: #fff; font-size: 44px;} .homepage-box-img {width: 98%; overflow: hidden; height: 20%; margin: 5px auto; padding-top: 3px;} .homepage-box-img img {width: 102%; height: auto;} .homepage-box a {color: #fff;} .homepage-box a:hover, .homepage-box a:focus {text-decoration: none; } .homepage-box p {font-style: italic; font-size: 16px; padding: 0 10px 15px;} a.homepage-box-btn {display: block; background-color: #06374b; text-align: center; color: #f9a231; font-family: 'Economica', 'sans-serif'; font-size: 40px; margin: 8px 0; text-transform: uppercase;} a.homepage-box-btn .glyphicon {font-size: 24px; margin-top: -8px;}
Viewing 15 lines of 80 lines. View entire code block.
I'm guessing the images aren't loading on the other server because it's at a different url than what you have in your template, or maybe at a different path on the server. You can either change the url's (from 66.255.245.252 to whatever the live server is), but that is a lot to remember to do every time you change the code or move it back and forth.
Instead, you can use C5's View::getInstance()->getThemePath() function to tell you what the theme path is, regardless of what domain name or folder path your site is on:
Instead, you can use C5's View::getInstance()->getThemePath() function to tell you what the theme path is, regardless of what domain name or folder path your site is on:
<?php defined('C5_EXECUTE') or die("Access Denied."); $nh = Loader::helper('navigation'); ?> <style> .homepage-box {margin:20px 0; padding: 3px;} .homepage-box-content {background-color: #00baf1; color: #fff; font-family: 'Economica', 'sans-serif'; min-height: 375px;} .homepage-box-title {text-transform: uppercase; text-align: center; margin-top: -25px;} .homepage-box-title h1 {color: #fff; font-size: 44px;} .homepage-box-img {width: 98%; overflow: hidden; height: 20%; margin: 5px auto; padding-top: 3px;} .homepage-box-img img {width: 102%; height: auto;} .homepage-box a {color: #fff;} .homepage-box a:hover, .homepage-box a:focus {text-decoration: none; } .homepage-box p {font-style: italic; font-size: 16px; padding: 0 10px 15px;} a.homepage-box-btn {display: block; background-color: #06374b; text-align: center; color: #f9a231; font-family: 'Economica', 'sans-serif'; font-size: 40px; margin: 8px 0; text-transform: uppercase;} a.homepage-box-btn .glyphicon {font-size: 24px; margin-top: -8px;}
Viewing 15 lines of 80 lines. View entire code block.