I am working on my website but I am using some common templates on the website For any Page that starts with the shop I want to add an HTML section there on how can I do it on the URL basis if the page URL is shop then the section will appear only
CodePudding user response:
You can get the Craft URL segments and then manage them with an if the condition.
`{% set pageUrl = craft.app.request.pathinfo %}
{% if pageUrl == "shop" %}
{% endif %}`