STCMS Documentation
Complete guide to building modern, secure React/PHP applications with STCMS framework
Product Details
This is an example product page that demonstrates:
you shall pass id and name as query parameters as follows at the end of the url
https://yourdomain.com/product?id=1&name=product1
Query Parameters Received:
- id: 1
- name: product1
code for this block
twig
{% if get_params is not empty %}
<div style="margin-top: 20px; padding: 15px; border: 1px solid #ddd; border-radius: 5px; background-color: #f9f9f9;">
<h3 style="margin-top: 0;">Query Parameters Received:</h3>
<ul style="list-style-type: none; padding-left: 0;">
{% for key, value in get_params %}
<li style="padding: 5px 0; border-bottom: 1px solid #eee;">
<strong style="color: #333;">{{ key }}:</strong>
<span style="color: #555;">{{ value }}</span>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
How This Page Works
This is an example product page that demonstrates:
- Dynamic content based on URL parameters
- Query parameter handling with STCMS
- Template inheritance with sidebar layout
- Conditional rendering based on data