Witam,
Korzystam z szablonu OPAL i chciałbym Was prosić o pomoc w jaki sposób można dodać odnośniki do własnych strony na stopce strony. Strona póki co działa pod adresem: https://alberomeble.comarch-esklep.pl/
Wydaje mi się, że jestem już blisko, ale prawdopodobnie coś zdefiniowałem nie tak już w footer.html.
To co zrobiłem to dodałem dwie własne strony. Dodałem nową grupę stron "Dodatkowe" i je tam przypisałem.
Na tym etapie wszystko działa i strony się otwierają.
Chciałem jednak zmodyfikować stopkę w ten sposób, alby te podstrony były widoczne bez konieczności rozwijania stopki.
W tym celu zmodyfikowałem plik footer.html w 3 miejscach.
Przed:
<div class="visible-bar">
<div class="left-footer-content">
<div class="show-footer"> <span class="glyphicon glyphicon-menu-down"></span> </div>
<div class="hide-footer"> <span class="glyphicon glyphicon-menu-up"></span> </div>
{% assign isTermsInFooter = false -%}
{% assign isContactInFooter = false -%}
{% assign isShippingInFooter = false -%}
{% assign isPaymentInFooter = false -%}
{% for section in config.Footer.Sections -%}
{% for page in section.Pages -%}
{% case page.Id -%}
{% when '12'-%}
{% assign isContactInFooter = true -%}
{% when '17' -%}
{% assign isPaymentInFooter = true -%}
{% when '16' -%}
{% assign isShippingInFooter = true -%}
{% when '11' -%}
{% assign isTermsInFooter = true -%}
{% else -%}
{% endcase -%}
{% endfor -%}
{% endfor -%}
<div>
<div class="col">
{% if isTermsInFooter -%}
<a href="{{config.DefinedPages.Terms.Url}}">{{config.DefinedPages.Terms.Name}}</a>
{% endif -%}
{% if isContactInFooter -%}
<a href="{{config.DefinedPages.Contact.Url}}">{{config.DefinedPages.Contact.Name}}</a>
{% endif -%}
</div>
<div class="col">
{% if isShippingInFooter -%}
<a href="{{config.DefinedPages.Shipping.Url}}">{{config.DefinedPages.Shipping.Name}}</a>
{% endif -%}
{% if isPaymentInFooter -%}
<a href="{{config.DefinedPages.Payment.Url}}">{{config.DefinedPages.Payment.Name}}</a>
{% endif -%}
</div>
Po:
<div class="visible-bar">
<div class="left-footer-content">
<div class="show-footer"> <span class="glyphicon glyphicon-menu-down"></span> </div>
<div class="hide-footer"> <span class="glyphicon glyphicon-menu-up"></span> </div>
{% assign isTermsInFooter = false -%}
{% assign isContactInFooter = false -%}
{% assign isShippingInFooter = false -%}
{% assign isPaymentInFooter = false -%}
{% assign isStrefaInFooter = false -%}
{% assign isKolekcjeInFooter = false -%}
{% for section in config.Footer.Sections -%}
{% for page in section.Pages -%}
{% case page.Id -%}
{% when '12'-%}
{% assign isContactInFooter = true -%}
{% when '17' -%}
{% assign isPaymentInFooter = true -%}
{% when '16' -%}
{% assign isShippingInFooter = true -%}
{% when '11' -%}
{% assign isTermsInFooter = true -%}
{% when '27' -%}
{% assign isStrefaInFooter = true -%}
{% when '28' -%}
{% assign isKolekcjeInFooter = true -%}
{% else -%}
{% endcase -%}
{% endfor -%}
{% endfor -%}
<div>
<div class="col">
{% if isTermsInFooter -%}
<a href="{{config.DefinedPages.Terms.Url}}">{{config.DefinedPages.Terms.Name}}</a>
{% endif -%}
{% if isContactInFooter -%}
<a href="{{config.DefinedPages.Contact.Url}}">{{config.DefinedPages.Contact.Name}}</a>
{% endif -%}
</div>
<div class="col">
{% if isShippingInFooter -%}
<a href="{{config.DefinedPages.Shipping.Url}}">{{config.DefinedPages.Shipping.Name}}</a>
{% endif -%}
{% if isPaymentInFooter -%}
<a href="{{config.DefinedPages.Payment.Url}}">{{config.DefinedPages.Payment.Name}}</a>
{% endif -%}
</div>
<div class="col">
{% if isStrefaInFooter -%}
<a href="{{config.DefinedPages.27.Url}}">{{config.DefinedPages.27.Name}}</a>
{% endif -%}
{% if isKolekjeInFooter -%}
<a href="{{config.DefinedPages.28.Url}}">{{config.DefinedPages.28.Name}}</a>
{% endif -%}
</div>
Niestety nie przyniosło to pożądanego skutku i odnośniki nie pojawiły się.
Poczytałem jeszcze na forum, że templajcie strony, która została użyta do budowy moich podstron (w moim przypadku user-page.html) powinna zostać dodana sekcja % if page
Zrobiłem to w następujący sposób.
Przed :
{% extends '_layout.html' -%}
{% block PageContent -%}
<article class="regulations">
<h1>{{ page.CurrentSiteNode.Name }}</h1>
<section class="content">
{% assign o = page.Objects["Text"][0] -%}
{{ [o].Content -}}
</section>
</article>
{% endblock -%}
Po:
{% extends '_layout.html' -%}
{% block PageContent -%}
{% if page.PageId == 27 -%}
{% assign FormalContent = config.TOS.FormalContents.27 -%}
{% endif -%}
{% if page.PageId == 28 -%}
{% assign FormalContent = config.TOS.FormalContents.28 -%}
{% endif -%}
<article class="regulations">
<h1>{{ page.CurrentSiteNode.Name }}</h1>
<section class="content">
{% assign o = page.Objects["Text"][0] -%}
{{ [o].Content -}}
</section>
</article>
{% endblock -%}
Niestety to również nie pomogło i skończyły mi się pomysły i moja wiedza na ten temat :(.
Jeżeli ktoś mógłby mi podpowiedzieć co zrobiłem źle lub czego nie zrobiłem, byłbym zobowiązany.
Pozdrawiam Jacek