This is the code added to category (custom design tab) to use the masshead extesnions. BUT this relies on images placed in the skin folder. (skin/frontend/default/jm_jasmine/images/media ….etc)
Code:
<reference name="mass-top"> <block type="joomlart_jmmasshead/core" name="jmmasshead" > <action method="setData"><name>title</name><value>Computers</value></action> <action method="setData"><name>background</name><value>images/media/slideshow/1.jpg</value> </action> <action method="setData"><name>description</name><value>Category of product </value></action> </block> </reference>
BUT My customer is going to have a problem. He doesnt want to ftp images to the skin folder at all.
I want to change this so that he can upload images to the normal MEDIA folder. For example, path to root/media/wysiwyg/
Where can I change the path in the masshead module code so it can access the path to the MAIN MEDIA folder everytime?
I need medai/wysiwyg/ (wysiwyg is just an example. But the media is the MAIN MEDIA folder).
5 answers
Hi maz001,
You just open the file app\design\frontend\default\jm_nerostemplate\joom lart\jmmasshead\core.phtml replace the code there by this code
PHP Code:
<div class="jm-masshead" <?php if(isset($config['background'])): ?> style="background-image: url(<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$config['background'] ?>)" <?php endif; ?>>
<div class="main">
<h3 class="ja-masshead-title"><span><?php echo $config['title']; ?></span></h3>
<div class="ja-masshead-desc"><span><?php echo $config['description']; ?></span></div>
</div>
</div>
Hope it should helps !
Hi
Apparently users can only upload to the wysiwyg folder, and NOT in the base MEDIA’ folder as requested earlier. Sorry about that π
So now I need to put the masshead images in a folder called ‘headers’ within the wysiwyg folder. like this… media/wysiwyg/headers/image1.jpg I tried the above code but no matter what I try, I cannot get the correct paths to put in the core.phtml and the admin.
I dont know what to use in the core.phtml but in the admin i tried the following, which i still think its wrong.
In the admin I tried this:
Code:
<reference name="mass-top"> <block type="joomlart_jmmasshead/core" name="jmmasshead" > <action method="setData"><name>title</name><value>Computers</value></action> <action method="setData"><name>background</name><value> media/wysiwyg/headers/image1.jpg</value> </action> <action method="setData"><name>description</name><value>Category of product </value></action> </block> </reference>
Did it work for you maz001 ? if not you can try to play around with background attribute
Hi Sherlock, no I didn’t get anywhere with it. The problem with using background selections in the categories is that they do not scale.
I would really like to keep with the joomlart format and start again with the initial suggestion you gave me.
Your code is for images put in the ‘Media’ folder (which was originally my mistake). I would be really grateful if you could adjust your original code so that the images are pulled from the ‘headers’ folder which lies within the wysiwyg folder….. wysiwyg/headers.
I just seem to be getting the paths all mixed up π
Okay maz001, I think you can try with something like this
HTML Code:
<action method="setData"><name>background</name><value> wysiwyg/headers/image1.jpg</value></action>
I think it should help !