Add a social media link to nav bar

Permalink Browser Info Environment
Hi,

I would like to add a Facebook icon to the nav bar. Right now, I have it listed on the nav bar as external link within the sitemap. It is viewed on the nav bar as “Facebook” in words. I would prefer it to be an icon somewhere on the bar. One point, the client does not want it located on the header or footer.

1 Attachment

Type: Discussion
Status: In Progress
shawnwatts
View Replies:
c5mix replied on at Permalink Reply
c5mix
Well, first you should modify the theme's main nav template (located at theme_slate/blocks/autonav/templates/slate_main_nav.php) to output a unique class for each nav item. That way you can style it with some CSS. You'll want to look for this section:
/*
//unique class for every single menu item
$classes[] = 'nav-item-' . $ni->cID;
*/

And uncomment it out so it looks like this:
//unique class for every single menu item
$classes[] = 'nav-item-' . $ni->cID;

Then you can style that <a> tag with that unique class as follows with some CSS
Take a look at this method:http://ran.ge/2009/11/11/css-trick-turning-a-background-image-into-...

concrete5 Environment Information

# concrete5 Version
5.6.3.1

# concrete5 Packages
Background Image (1.0), Backup Voodoo (2.3.5.1), Enlil Transparent Yogurt (1.0.0), Facebook Like Button (1.1), FAQ Page Manager (1.0), FlexSlider (2.2.0.5), Galleria image gallery (2.0), Google Map (Premium) (2.1), Pro Events (11.1.0), Pro Forms (7.5.6), Slate Theme (1.5.3.1), Social Icons (1.2), Social Links (5.0.0).

# concrete5 Overrides
blocks/php.ini, controllers/php.ini, elements/php.ini, helpers/php.ini, jobs/php.ini, js/php.ini, css/php.ini, languages/zh_TW, languages/zh_CN, languages/vi_VN, languages/tr_TR, languages/sv_SE, languages/sl_SI, languages/sk_SK, languages/ru_RU, languages/ro_RO, languages/pt_PT, languages/nl_NL, languages/nb_NO, languages/ja_JP, languages/it_IT, languages/he_IL, languages/fr_FR, languages/fi_FI, languages/fa_IR, languages/es_PE, languages/es_MX, languages/es_ES, languages/es_AR, languages/el_GR, languages/de_DE, languages/da_DK, languages/cs_CZ, languages/ar, languages/php.ini, libraries/php.ini, mail/php.ini, models/php.ini, single_pages/php.ini, themes/php.ini, tools/php.ini

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

# Server Software
Apache

# Server API
cgi-fcgi

# PHP Version
5.5.18

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, json, libxml, mbstring, mcrypt, mysql, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, session, shmop, SimpleXML, soap, SPL, sqlite3, standard, tidy, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, zlib.

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - -1
max_input_vars - 1000
memory_limit - 128M
post_max_size - 8M
sql.safe_mode - Off
upload_max_filesize - 2M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/8.0 Safari/600.1.25

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.