# Pages Web multiples

**URL:** <https://forum.arduino.cc/t/pages-web-multiples/915591>\
**Category:** Français\
**Created:** [October 16, 2021, 11:38pm UTC](https://forum.arduino.cc/t/pages-web-multiples/915591 "2021-10-16T23:38:51Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![hbachetti](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/hbachetti/32/238810_2.png) [@hbachetti](https://forum.arduino.cc/u/hbachetti)\
**Post date:** [October 18, 2021, 10:44pm UTC](https://forum.arduino.cc/t/pages-web-multiples/915591/8 "2021-10-18T22:44:41Z")

</div>

J'ai retrouvé un exemple plus simple, sans saucissonnage :

```cpp
const char webRoot[] = R"(<!DOCTYPE HTML>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>TEST DE MISE EN PAGE</title>
<style type="text/css">
body {background-color: #00979c}
</style></head>
<body>
Temp&eacute;rature = %TEMP%&deg;C<br>
<button onclick="location.href='/tup'" type='button'> + </button>
<button onclick="location.href='/tdown'" type='button'> - </button>
<br><br><br>
Pression = %PRESSURE%hPa<br>
<button onclick="location.href='/pup'" type='button'> + </button>
<button onclick="location.href='/pdown'" type='button'> - </button>
</body>
</html>
)";

```

```cpp
int temp = 22;
int pressure = 1013;

void handleRoot(void)
{
  String value(temp);
  String message = webRoot;
  message.replace("%TEMP%", value);
  value = pressure;
  message.replace("%PRESSURE%", value);
  server.send(200, "text/html", message);
}

```

---

_[View the full topic](https://forum.arduino.cc/t/pages-web-multiples/915591)._
