![]() |
ChatGPT 5/26/2025 |
Certainly! In PHPRunner, if you want to set a default "Item ID" for a snippet that you plan to use across multiple pages, you can achieve this by modifying the snippet to accept a parameter. Here’s how you can do it:
By following these steps, you can set a default "Item ID" for your snippet in PHPRunner, making it easier to use across multiple pages without renaming or manually setting the ID each time. |
![]() |
Sergey Kornilov admin 5/26/2025 |
What kind of problem you are trying to solve by assigning the same specific ItemID to all code snippets on different pages? |
C
|
Chris Whitehead 5/28/2025 |
As Sergey has already asked, it would be helpful to know a bit more about why you want to do this, why use this instead of a variable or will the value change each time the application is loaded.. Anyway, here's my two bobs worth. Create a function which is set in the "after application initialised" event in the events section and have a default as that. function myDefaultValue( $default = 10 ) { |