Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Javascript adding on Magento Phtml file
 
vishalni85
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2010-12-22
 

CMS Page link for PDF file
<a href="{{store url=""}}company"></a>
{{media url=’/pdf/Copyrighted-Materials-Reproduction-Application.pdf’}}

On Phtml Page
<a href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'media/pdf/ParentOrderForm.pdf'?>">

call a javascrip in admin cms page
<script src="{{skin url =’js/pluit-carousel.js’}}” type="text/javascript\"></script>

call a css in admin cms page
<link rel="stylesheet" href="<?php echo $this->getSkinUrl('css/pluit-carousel.css') ?>” type="text/css">

call a javascrip on phtml page
<script src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'js/magecoders/pirobox_extended.js'?>” type="text/javascript\"></script>

 
Magento Community Magento Community
Magento Community
Magento Community
 
renatopierri
Jr. Member
 
Total Posts:  3
Joined:  2012-06-25
 

Perfect..

Regarding calling a javascrip on phtml page I did some changes to have same format used in head section

<script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).'js/folder_name/script_file.js'?>"></script>

Thx a lot for that tip!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top