User Tools

Site Tools


how_to_create_a_vqmod

How to Create A vQmod

Example

Here is an sample how to edit pages/index.inc.php and output Hello World before the rest of the content.

Save the following file 'hello_world.xml' in the folder ~/vqmods/xml/:

<?xml version="1.0" encoding="UTF-8"?>
<modification>
  <id>Hello World</id>
  <version>1.0</version>
  <vqmver required="true">2.4.0</vqmver>
  <author>ACME Corp.</author>
  
  <file path="pages/" name="index.inc.php">
    <operation error="log">
      <search position="before"><![CDATA[
  echo $page->stitch('views/index');
      ]]></search>
      <add><![CDATA[
  echo 'Hello World';
      ]]></add>
    </operation>
    
    <!-- Another operation ... -->
  </file>
  
  <!-- Another file ... -->
  
</modification>

For more information visit https://github.com/vqmod/vqmod/wiki

how_to_create_a_vqmod.txt · Last modified: 2020/08/17 11:47 by A User Not Logged in