top nav

Permalink Browser Info Environment
Hello
I purchased your theme and i really like it so far, but i stumbled on 1 big issue on Nav menu:
i need the site to have 3 languages, and later maybe more.
So, for the top menu, it shows ALL the pages and subpages with no way to hide some or select what level to show, like amiant css3 menu does, that i use a lot, but it's not responsive...
.
So, i would appreciate if you could point me, where to look, and what to change in the Topnav Template, or elsewhere so i can choose the nav level or under what page i show the menu.
For the Global thing , i can erase the word Global near the Area in the header.php, right?
Thank you in advance
George

Type: Ticket
Status: Archived
netart
View Replies:
1976Ltd replied on at Permalink Reply
1976Ltd
Hi George,

I'm not exactly sure of what you need but to change the top nav menu you can find the hard-coded section in the file: packages/theme_hi_vis/themes/hi_vis/elements/header.php.

You can change the settings in the following lines of code:

<?php 
            $bt_main = BlockType::getByHandle('autonav');
            $bt_main->controller->displayPages = 'top';
            $bt_main->controller->orderBy = 'display_asc';                    
            $bt_main->controller->displaySubPages = 'all';
            $bt_main->controller->displaySubPageLevels = 'custom';      
            $bt_main->controller->displaySubPageLevelsNum = '3'; 
            $bt_main->render('templates/topNav');
        ?>


So to change the levels you can change:

$autonav->controller->displayPages = 'top';


to

$autonav->controller->displayPages = 'second_level';


And yes if you remove the Global from GlobalArea the area will no longer show the same content on all pages. Please note the the topnav which is hard-coded is below the Global Area which typically is for the sitename or logo.

Regards,

Gareth
netart replied on at Permalink Reply
netart
Hi Gareth
Thank you for your fast reply
I had already seen this area of code in the topnav-template, so i have
1 more question on that:
how to tell the menu to show all pages beneath a particular page, i.e. English, Russian etc.
And If i do change that, then in the russian section of the site i must have an altered version of the topnav template, i.e. topnav-rus, to show this section, right?
And the same for English etc, right?
So, how do i make the topnav editable from within the page?
A lot of questions, but need help badly , not being a C5 guru...

Greetings
George
1976Ltd replied on at Permalink Reply
1976Ltd
I think the best idea would be to remove the hardcoded autonav and replace it with a global area i.e.;

<?php   
          $a = new GlobalArea('Navigation');
          $a->display();
          ?>


Then you can put any page into edit mode and add an autonav block which suits your requirements. Just ensure you choose the custom template for your new block called TopNav so the styling is the same.
netart replied on at Permalink Reply
netart
Hi Gareth
I tried it myself, exactly what you propose here, hoping it will work, but no...
It gives a message of the kind: ../concrete/core/model/area.php error in line 566
(displayed in code inside the website , in the place of the menu)
Do i need to change something in code in some other file?
I know that we are very close to a solution but some more advice would be really apperciated
Thank you
George
1976Ltd replied on at Permalink Reply
1976Ltd
That should have worked. Please ensure you have the <nav> tags as well:

replace

<nav class="top-bar contain-to-grid centered" data-topbar data-options="mobile_show_parent_link: true">
        <?php
            $bt_main = BlockType::getByHandle('autonav');
            $bt_main->controller->displayPages = 'top';
            $bt_main->controller->orderBy = 'display_asc';                    
            $bt_main->controller->displaySubPages = 'all';
            $bt_main->controller->displaySubPageLevels = 'custom';      
            $bt_main->controller->displaySubPageLevelsNum = '3'; 
            $bt_main->render('templates/topNav');
        ?>
      </nav>


with

<nav class="top-bar contain-to-grid centered" data-topbar data-options="mobile_show_parent_link: true">
         <?php   
          $a = new GlobalArea('Navigation');
          $a->display();
          ?>
</nav>
netart replied on at Permalink Reply
netart
Yesssss!
My friend with your very helpful and detailed advices, you managed to solve my problem!
Excellent support, both on speed and efficiency.
5 stars from me!
Will write a review very soon
Thanks again
George
1976Ltd replied on at Permalink Reply
1976Ltd
No worries George. Thanks very much.
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.

concrete5 Environment Information

# concrete5 Version
5.6.3.3

# concrete5 Packages
Amiant CSS3 Menu (0.3), Hi_Vis (1.0.8).

# concrete5 Overrides
languages/de_DE, languages/nl_NL, languages/es_MX, languages/es_AR, languages/sk_SK, languages/vi_VN, languages/ro_RO, languages/ar, languages/fa_IR, languages/ja_JP, languages/es_PE, languages/sv_SE, languages/it_IT, languages/sl_SI, languages/ru_RU, languages/fi_FI, languages/nb_NO, languages/da_DK, languages/fr_FR, languages/pt_PT, languages/zh_TW, languages/cs_CZ, languages/tr_TR, languages/es_ES, languages/el_GR

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off

# Server Software
Apache

# Server API
cgi-fcgi

# PHP Version
5.3.29

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, intl, json, libxml, mbstring, mcrypt, memcache, mssql, mysql, mysqli, openssl, pcntl, pcre, PDO, pdo_dblib, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, readline, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, SQLite, sqlite3, standard, suhosin, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib.

# PHP Settings
max_execution_time - 60
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 4096
memory_limit - 192M
post_max_size - 64M
safe_mode - Off
safe_mode_exec_dir - <i>no value</i>
safe_mode_gid - Off
safe_mode_include_dir - <i>no value</i>
sql.safe_mode - Off
upload_max_filesize - 128M
memcache.max_failover_attempts - 20
mssql.max_links - Unlimited
mssql.max_persistent - Unlimited
mssql.max_procs - Unlimited
mssql.textlimit - Server default
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH
suhosin.cookie.max_array_depth - 50
suhosin.cookie.max_array_index_length - 64
suhosin.cookie.max_name_length - 1024
suhosin.cookie.max_totalname_length - 1100
suhosin.cookie.max_value_length - 4096
suhosin.cookie.max_vars - 1000
suhosin.executor.include.max_traversal - 0
suhosin.executor.max_depth - 0
suhosin.get.max_array_depth - 50
suhosin.get.max_array_index_length - 64
suhosin.get.max_name_length - 1024
suhosin.get.max_totalname_length - 1100
suhosin.get.max_value_length - 4096
suhosin.get.max_vars - 1000
suhosin.log.phpscript.is_safe - Off
suhosin.memory_limit - 256M
suhosin.post.max_array_depth - 50
suhosin.post.max_array_index_length - 64
suhosin.post.max_name_length - 1024
suhosin.post.max_totalname_length - 1100
suhosin.post.max_value_length - 62914560
suhosin.post.max_vars - 5120
suhosin.request.max_array_depth - 50
suhosin.request.max_array_index_length - 64
suhosin.request.max_totalname_length - 1100
suhosin.request.max_value_length - 62914560
suhosin.request.max_varname_length - 1024
suhosin.request.max_vars - 5120
suhosin.session.max_id_length - 128
suhosin.upload.max_uploads - 25

Browser User-Agent String

Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.