Navigator template for footer not working
Navigator template for footer not working
Hello everyone!
I have a problem considering second menu in footer and I can't figure out what's wrong. If someone can point me to the right direction it would be great!
I am using this as main navigation:
{Navigator template="00_acs_navigator" show_all="0"}
and it's working fine.
There is second navigation in footer:
{Navigator template="00_acs_footer_navigator" show_all="0"}
and it's not working at all. There is no navigation in the footer, all I get in footer is exactly the same expression I have used for navigation call in footer (the red one from above).
"00_acs_footer_navigator" template was placed in the page called "00_acs_footer" which was called into templates with {page_attr page="00_acs_footer" key="footer"}. Entire footer block is ok, it's showing up with all it's elements except navigation.
What am I doing wrong?
Thank you in advance for your help and best regards!
I have a problem considering second menu in footer and I can't figure out what's wrong. If someone can point me to the right direction it would be great!
I am using this as main navigation:
{Navigator template="00_acs_navigator" show_all="0"}
and it's working fine.
There is second navigation in footer:
{Navigator template="00_acs_footer_navigator" show_all="0"}
and it's not working at all. There is no navigation in the footer, all I get in footer is exactly the same expression I have used for navigation call in footer (the red one from above).
"00_acs_footer_navigator" template was placed in the page called "00_acs_footer" which was called into templates with {page_attr page="00_acs_footer" key="footer"}. Entire footer block is ok, it's showing up with all it's elements except navigation.
What am I doing wrong?
Thank you in advance for your help and best regards!
Re: Navigator template for footer not working
Would this work?
{page_attr page="00_acs_footer" key="footer" assign='footer'}
{eval var='footer'}
{page_attr page="00_acs_footer" key="footer" assign='footer'}
{eval var='footer'}
Re: Navigator template for footer not working
If I put it instead
{Navigator template="00_acs_footer_navigator" show_all="0"}
same thing happens. Not working, just showing the new expression in the footer - the content of curly brackets with the brackets themselves.
{Navigator template="00_acs_footer_navigator" show_all="0"}
same thing happens. Not working, just showing the new expression in the footer - the content of curly brackets with the brackets themselves.
Re: Navigator template for footer not working
Did you give velden's suggestion a try?jakovbak wrote:If I put it instead
{Navigator template="00_acs_footer_navigator" show_all="0"}
same thing happens. Not working, just showing the new expression in the footer - the content of curly brackets with the brackets themselves.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Navigator template for footer not working
Yes and sorry, my previous answer was not very precise... I have tried with Velden's suggestion but ended up with same result.
If I put this
{page_attr page="00_acs_footer" key="footer" assign='footer'}
{eval var='footer'}
instead of this
{Navigator template="00_acs_footer_navigator" show_all="0"}
same thing happens. Not working, just showing the new expression in the footer - the content of curly brackets with the brackets themselves.
That's how it should've been written...
If I put this
{page_attr page="00_acs_footer" key="footer" assign='footer'}
{eval var='footer'}
instead of this
{Navigator template="00_acs_footer_navigator" show_all="0"}
same thing happens. Not working, just showing the new expression in the footer - the content of curly brackets with the brackets themselves.
That's how it should've been written...
Re: Navigator template for footer not working
That was not what velden suggested at all...
What velden suggested (if I understood correctly) was to replace {page_attr page="00_acs_footer" key="footer"} with {page_attr page="00_acs_footer" key="footer" assign='footer'}{eval var='footer'}... unless I'm missing something...jakovbak wrote:(the red one from above).
"00_acs_footer_navigator" template was placed in the page called "00_acs_footer" which was called into templates with {page_attr page="00_acs_footer" key="footer"}. Entire footer block is ok, it's showing up with all it's elements except navigation.
What am I doing wrong?
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Navigator template for footer not working
Stupid me... But unfortunately me being silly or not won't change a thing. Same thing happens (see footer screenshot in attachment).
Re: Navigator template for footer not working
Then something else has to be the issue. That would have solved your problem as the {page_attr...} tag doesn't evaluate the contents iirc. You may need to explain better what you are doing.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Navigator template for footer not working
Ok. I'm still struggling a little bit with this new approach for certain elements of 2.x CMSMS so maybe I got it all wrong, I don't know...
I wanted to make several page templates containing a couple of shared elements. One element is above mentioned "acs_footer". In documentation there is a section explaining new approach to "GC blocks" so I have created a page called "00_acs_footer" to use it as "GC block" across all of the site templates. A template within a template I guess... And it works, "footer" is being displayed on every page like it should be.
The only problem is - footer navigation.
I have Navigator::Navigation called 00_acs_footer_navigator (I don't want sitemap or something like that, I want specific pages to be displayed in this menu). So, this 00_acs_footer_navigator is included in my "GC block" like this:
The way I see it (and I repeat, it could be all wrong!), this call for navigation should work. I can't find any spelling mistakes but I'm not a programmer so I can't find any other reason by myself.
I wanted to make several page templates containing a couple of shared elements. One element is above mentioned "acs_footer". In documentation there is a section explaining new approach to "GC blocks" so I have created a page called "00_acs_footer" to use it as "GC block" across all of the site templates. A template within a template I guess... And it works, "footer" is being displayed on every page like it should be.
The only problem is - footer navigation.
I have Navigator::Navigation called 00_acs_footer_navigator (I don't want sitemap or something like that, I want specific pages to be displayed in this menu). So, this 00_acs_footer_navigator is included in my "GC block" like this:
Code: Select all
<div class="container">
<div class="col-md-3 col-sm-6">
<h4><img class="img-responsive" src="uploads/img/acs-logo.png" alt=""></h4>
</div> <!-- /.col-md-3 -->
<div class="col-md-3 col-sm-6">
<h4>Društvene mreže</h4>
<div class="social">
<a href="#" class="external facebook" data-animate-hover="pulse"><i class="fa fa-facebook"></i></a>
<a href="#" class="external gplus" data-animate-hover="pulse"><i class="fa fa-google-plus"></i></a>
<a href="#" class="external twitter" data-animate-hover="pulse"><i class="fa fa-twitter"></i></a>
</div>
<hr class="hidden-md hidden-lg">
</div> <!-- /.col-md-3 -->
<div class="col-md-3 col-sm-6">
<h4>Navigacija</h4>
{Navigator template="00_acs_footer_navigator" show_all="0"}
<hr class="hidden-md hidden-lg">
</div> <!-- /.col-md-3 -->
<div class="col-md-3 col-sm-6">
<h4>Lokacija</h4>
<p><strong>Auto centar "Star"</strong>
<br>Ulica
<br>Zadar
<br>Hrvatska
<br>Telefon
<br>Telefax
</p>
<a href="#" class="btn btn-small btn-template-main">Idi na "Kontakte"</a>
<hr class="hidden-md hidden-lg hidden-sm">
</div> <!-- /.col-md-3 -->
</div> <!-- /.container -->
<a href="#" class="back-to-top">
<i class="fa fa-angle-up"></i>
</a><!-- Go To Top Link -->
Re: Navigator template for footer not working
Not quite an answer to the problem, but as I notice you're using a lot of markup (code) and only little content, it doesn't seem the code is to be edited by an editor, does it?
Wouldn't it then be better to use a template of Core::Generic and include that in your other templates? Possibly even better/easier would be to make use of template inheritance.
IMO the {page_attr ...} method should only be used if you want one or more 'GCBs' which are to be edited by an editor (so content only, no markup).
Wouldn't it then be better to use a template of Core::Generic and include that in your other templates? Possibly even better/easier would be to make use of template inheritance.
IMO the {page_attr ...} method should only be used if you want one or more 'GCBs' which are to be edited by an editor (so content only, no markup).
Re: Navigator template for footer not working
To add a bit to what velden just said:
Global Content Blocks were removed because they were, more often than not, being badly used. They were actually templates, but were being used as both templates and content blocks which meant that we were allowing content editors to interfere with the design... which is always a bad thing. Content Blocks shouldn't be evaluated (parsed by the smarty engine) with very few exceptions.
On the other hand we were duplicating something that Smarty already does, and does better: including templates inside templates so that you can have construction blocks that you can easily rearrange on one main template. And Smarty also has template inheritance (as velden referred) which is way better than including templates inside templates (nesting too often and too deep may slow a site to a crawl). Knowing how to use these may take some time to learn but is a good set of tools to have at hand: they will definitely make your sites better and faster to develop when mastered.
And when you do need content blocks (without design elements on them) there are several other approaches, one being the {page_attr ...}, other by using 3rd party modules which already exist and give a few more options.
Global Content Blocks were removed because they were, more often than not, being badly used. They were actually templates, but were being used as both templates and content blocks which meant that we were allowing content editors to interfere with the design... which is always a bad thing. Content Blocks shouldn't be evaluated (parsed by the smarty engine) with very few exceptions.
On the other hand we were duplicating something that Smarty already does, and does better: including templates inside templates so that you can have construction blocks that you can easily rearrange on one main template. And Smarty also has template inheritance (as velden referred) which is way better than including templates inside templates (nesting too often and too deep may slow a site to a crawl). Knowing how to use these may take some time to learn but is a good set of tools to have at hand: they will definitely make your sites better and faster to develop when mastered.
And when you do need content blocks (without design elements on them) there are several other approaches, one being the {page_attr ...}, other by using 3rd party modules which already exist and give a few more options.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
Re: Navigator template for footer not working
If the module call isn't getting evaluated by smarty then it is problem that it is place in a non-smarty code.
You need to start at the begin and figure out why it isn't getting evaluated. -- I can't make sense of where the module call is that it isn't getting parsed with smarty.
If you need help you should post each template so we can trace the smarty parsing.
You need to start at the begin and figure out why it isn't getting evaluated. -- I can't make sense of where the module call is that it isn't getting parsed with smarty.
If you need help you should post each template so we can trace the smarty parsing.
Re: Navigator template for footer not working
Ok guys, thank you for your suggestions! Now I'll try to figure out what's wrong by eliminating errors in step-by-step method. I'll get back to you as soon as I get something useful!
[SOLVED] Re: Navigator template for footer not working
WOW! The very first attempt solved the problem!
I have created new Core::Generic template (tnx velden!
) and copy/paste the entire code from 00_acs_footer page (code was quoted above) without any changes. Then I have replaced
{page_attr page="00_acs_footer" key="footer" assign='footer'}
with
{include file='cms_template:00_acs_footer_TPL'}
(call for my new Core::Generic template) and now it works!
Thank you guys, not just for your help but also for clearing up a little bit the logic and use of different types of templates.
I wish you all great rest of the day!
Best regards,
Vinko
I have created new Core::Generic template (tnx velden!

{page_attr page="00_acs_footer" key="footer" assign='footer'}
with
{include file='cms_template:00_acs_footer_TPL'}
(call for my new Core::Generic template) and now it works!
Thank you guys, not just for your help but also for clearing up a little bit the logic and use of different types of templates.
I wish you all great rest of the day!
Best regards,
Vinko