Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Function</p> <pre><code>$localPath = Mage::getSingleton( 'core/design_package' )-&gt;getFilename( 'manufacturertab/' . $filename, array( '_type' =&gt; 'skin', '_default' =&gt; false ) ); </code></pre> <p>will return the same path as</p> <pre><code>$urlPath = $this-&gt;getSkinUrl( 'manufacturertab/' . $filename ); </code></pre> <p>but on your local file system. You can omit the '_default' => false parameter and it will stil work (I left it there just because getSkinUrl also sets it internaly).</p> <p>Note that the parameter for getSkinUrl and getFilename can be either a file or a directory but you should always use the entire path (with file name) so that the fallback mechanism will work correctly.</p> <p>Consider the situation</p> <p>skin/default/default/manufacturertab/a.jpg</p> <p>skin/yourtheme/default/manufacturertab/b.jpg</p> <p>In this case the call to getSkinUrl or getFilename would return the path to a.jpg and b.jpg in both cases if file name is provided as a parameter but for your case where you only set the folder name it would return skin/yourtheme/default/manufacturertab/ for both cases and when you would attach the file name and check for a.jpg the check would fail. That's why you shold always provide the entire path as the parameter.</p> <p>You will still have to use your own function to check if the file exists as getFilename function returns default path if file doesn't exist (returns skin/default/default/manufacturertab/foo.jpg if manufacturertab/foo.jpg doesn't exist).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload