How to make chvars

Where you can make own chvar

  1. Open Chvars.js

  2. Go to chvarsLoader()

RocketFramework/Chvars.js
// Chvars handler function
function chvarsLoader(page_content)
{
    let page_to_return = page_content;
// Make new chvars here
    page_to_return = chvar(page_to_return, "password", "123456789");
    // To make new, copy and paste like below
    // > page_to_return = chvar(page_to_return, "password", "123456789");
    return page_to_return;
}
  1. Go to your template

structure/pages/main.html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>RocketCode Example</title>
    <!-- React is better than this framework, but if you need a simpler framework with more or less the same functionality, you can use RocketCode-Framework, I will be very glad to see contributors! -->

    !stylesMain! <!-- Here we are loading CSS-->
</head>
<body>
    !loggerMainPage! <!-- Logger celem -->

    <h1>Password below</h1>
    <h3>{{ password }}</h3>

    !scriptMain1! <!-- Here we are loading JS-->
</body>
</html>
Features

Last updated