Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add docs
Adam Janik1398f09a00fc
diff --git a/docs/architecture/page.rst b/docs/architecture/page.rstnew file mode 100644index 0000000000..55ffaaaac2--- /dev/null+++ b/docs/architecture/page.rst@@ -0,0 +1,35 @@+Saleor Pages+===================+++Setting up custom pages+---------------++You can set up your own pages such as "About us" or "Important Announcement!" in the Pages menu in dashboard.+Note that if you are not an admin, you need to be in group with proper permissions.+++Providing an URL to your page in storefront+----------------------------++If you want to add a link to recently created page in storefront, all you need to do is to put the following code:+`<a href="{% url "page:details" slug="your-slug" %}">Text for the link</a>`+in the proper template.+For example in default Saleor setup, in the footer there is a list of categories:+```+<ul>+{% for category in categories %}+ <li>+ <a href="{{ category.get_absolute_url }}">+ {{ category|capfirst }}+ </a>+ </li>+{% endfor %}+```+Say, you want to add "Terms of Service" page with `terms-of-service` slug; you just need to add:+```+{% endfor %}+<li>+ <a href="{% url "page:details" slug="terms-of-service" %}">ToS</a>+</li>+```diff --git a/templates/dashboard/page/detail.html b/templates/dashboard/page/detail.htmlindex 8e7098d444..69d32fbd26 100644--- a/templates/dashboard/page/detail.html+++ b/templates/dashboard/page/detail.html@@ -54,7 +54,7 @@{% trans "Remove page" context "Page action" %}</a>{% endif %}- <a href="{{ page.get_absolute_url }}" target="_blank" class="btn-flat waves-effect">+ <a href="{% url "page:details" slug=page.slug %}" target="_blank" class="btn-flat waves-effect">{% trans "View on site" context "Page action" %}</a></div>