Question

I am trying to replace files in the current and sub folder without duplicating the vqmod code. So something like this using the path and comma separated name:

<file path="admin/view/template/module/" name="*.tpl, */*.tpl">
       <operation>
           <search position="replace" offset="24"><![CDATA[ 
           function file_upload(field, preview) { 
           ]]></search>
           <ignoreif><![CDATA[ 
           function el_uploadSingle( 
           ]]></ignoreif>
           <add><![CDATA[
           // new code for upload
           ]]></add>
       </operation>
</file>

The idea is that this script would replace both:

  • admin/view/template/module/foo.tpl
  • admin/view/template/module/foo/foo.tpl
Was it helpful?

Solution

Try This

<file name="admin/view/template/module/foo.tpl,admin/view/template/module/foo/foo.tpl">
       <operation>
           <search position="replace" offset="24"><![CDATA[ 
           function file_upload(field, preview) { 
           ]]></search>
           <ignoreif><![CDATA[ 
           function el_uploadSingle( 
           ]]></ignoreif>
           <add><![CDATA[
           // new code for upload
           ]]></add>
       </operation>
</file>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top