Need the different key value in "control.xml" file

Post Reply
mobhar
User
Posts: 11727

Need the different key value in "control.xml" file

Post by mobhar »

I recently created some extensions for v10 in order to customize the PHPMaker template. Some of my extensions need to customize the code in "share-script.php" file.

Unfortuntely, the only session name in "share-script.php" file is "phpfunction", and that session name is also same with the session name in the other files as follow:

  1. delete-script.php,
  2. report.php,
  3. search-script.php,
  4. view-script.php,
  5. update-script.php.

As we can see in "control.xml" template file, inside the "delete", "report", "search", "view", and "update" control id, each of them contains the following sessions key:
<session type="key" value="phpfunction" />
<session type="key" value="phpfunction" ifile="share-script.php" />

The first line will insert the code inside the "phpfunction" session name that belongs to each of five .php files above, and the second line will insert the code from the "phpfunction" session name that belongs to the "share-script.php" file.

So, the problem is, my extension cannot customize the code in "share-script.php" file, since the change that controlled from my extension will always be applied to the session name in each of those five files. When I changed the session name from one of the two lines of code above, then my extension can successfully customize the code in "share-script.php" file.

Could you please to change the session name in the "share-script.php" file, so that "phpfunction" session name will be used only for those five template files above? This change will be very useful in order to make the ability of changing/replacing the code in "share-script.php" file from the extension side.

Thank you.


Webmaster
User
Posts: 9427

Post by Webmaster »

Post control.xml of your extension.


mobhar
User
Posts: 11727

Post by mobhar »

This is one of the control id that belongs to "view":

<!-- table view page -->
<control id="view" type="table" action="change">
<!-- phpmain -->
<session type="key" value="phpmain" action="change"
ifile="fixedview.php"/>
<!-- phpfunction -->
<session type="key" value="phpfunction" action="change"
ifile="share-script_2.php" />
<!-- htmtable -->
<session type="key" value="htmtable" action="change"
ifile="fixedview.php"/>
</control>

The customized code of "share-script.php" file is located inside the "share-script_2.php" of extension file.


mobhar
User
Posts: 11727

Post by mobhar »

Today I just downloaded v10.0.2 and this has been handled in the template. Thank you. :)


Post Reply