Design Configuration - Specific HTML Elements of Default Design

This will cover the steps to getting started with the software. It will instruct you on many of the questions, decisions and configurations you will need to get the software the way you need it.
Post Reply
1kiwi1
Site Admin
Posts: 204
Joined: Mon Nov 19, 2018 9:26 pm

Design Configuration - Specific HTML Elements of Default Design

Post by 1kiwi1 »

Specific HTML Elements of Default Design

This section will explain how to manage specific elements of the default design. If you change your template sets completely or make massive changes to your design you may need to consider the elements of this section more as concept than as exact step by steps to managing those features.

Items covered in this section:
  • Page title management in the default design
  • Where to change the default banner locations
  • Where to make changes to the header
  • Where to make changes to the footer
  • How/Where to upload you site logo into the default design
  • Where to change specific elements of the front page design
  • Where to effect the featured scroller in the category browsing pages
1kiwi1
Site Admin
Posts: 204
Joined: Mon Nov 19, 2018 9:26 pm

Re: Design Configuration - Overall Layout

Post by 1kiwi1 »

Overall Layout

This page applies to version 7.3.0 and up.

NOTE: As at 2023 there will be parts of this page that need updating to correlate with the developments in browser versions and availability, especially where I.E has been retired.

This page will describe every part of the "overall" template, why things are in certain places, etc. with regards to the overall template.

Note that on this page, whenever we speak of templates or anything like that, we will be referring to how things work in the default design, to help you understand how the default design works. But since you ultimately have full control over templates, you can change things to work however you want. (Remember do not edit default templates!).

Default RWD Uses HTML5 Boilerplate Project


HTML5 Boilerplate is the same open source project used by many sites across the web, and many other modern web based software using HTML5 as well. Using HTML5 Boilerplate ensures we start from the best practices of the industry. That said, we've made heavy modifications and removed a lot that is in the starting HTML5 boilerplate contents. As the project says, it is very "delete key friendly" meaning they make it easy to remove the stuff that you do not need to use.

There is also a lot of modifications to make the HTML5 boilerplate fit into the Geocoremax software context.

Our developers actively monitor changes on the HTML5 Boilerplate project, and will apply changes based on new versions of the project as needed. We will try our best to keep this process as streamlined as possible so that updates are as easy as they can be. But at the same time, if some change to overall templates are needed to, for instance, fix some issue on a new device, we will have instructions on how to apply the changes required as part of the full update instructions. Whenever the changes are minor in nature and have little (if any) effect on existing sites, we will omit such changes. In other words, if you follow the full update instructions, you will get all the changes you "need" and skip over any that aren't that big a deal.

3 Layout Starting Templates

There are 3 main layout templates listed below:
  • layout-1-column.tpl
  • layout-2-column.tpl
  • layout-3-column.tpl
Note that none of the 3 templates are used directly, they are not attached to any pages in the system. If you make a change in any of those templates, that change will have no effect on your existing design. These templates are used as a starting point; every "overall" page template started from one of these 3 templates. For instance, basic_page.tpl used layout-1-column.tpl as the starting point, while the listing details templates used layout-3-column.tpl as starting points.

All 3 layouts have very similar contents, in fact the beginning part up to the <body> tag is going to be identical on all 3 templates. We will go over that section first.

HTML & Head Explained

This section will explain the common section up to the beginning body tag. This section will be identical for all 3 layouts.

The HTML will look like this:

Code: Select all

<!DOCTYPE html>
<html class="no-js">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>{module tag='module_title'}</title>
		<meta name="description" content="">
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
 
		{head_html}
 
		<!--  This loads the RSS feed  -->
		<link rel="alternate" type="application/rss+xml" title="Newest Listing Feed" href="rss_listings.php" />
 
		{include file='head_common.tpl'}
		<script src="js/modernizr-2.6.2.min.js"></script>
		<script>Modernizr.load({ test: Modernizr.mq('only all'),nope:'{external file="css/old_ie.css"}'});</script>
	</head>
Below the different parts are explained. Note that this is based partly on the HTML5 Boilerplate Docs but changed to reflect any differences with the software.

Doctype

The first line:
<!DOCTYPE html>
This is the standard HTML5 doctype, it should always be the first thing in the overall template.

HTML & The no-js class

Line 2:
<html class="no-js">
Allows you to more easily explicitly add custom styles when JavaScript is disabled (no-js) or enabled (js). It is best to keep this intact. Note that the Modernizr library will automatically change the class from no-js to js, but is only able to do this if JS is enabled on the browser. Therefore if the no-js class is still set on the HTML tag, you can be sure that JS is disabled on the browser. One use of this would be to show a paragraph explaining to the user that they need to have Javascript enabled to fully enjoy the website. This will help avoid what is known as FOUC (Flash Of Unstyled Content).

You can see more info at https://www.paulirish.com/2009/avoiding-the-fouc-v3/

The Order of Meta Tags & Title

Lines 4-10:

Code: Select all

<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>{module tag='module_title'}</title>
		<meta name="description" content="">
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
 
		{head_html}
This is just an explanation of the order for the following lines, note that some of the lines have their own additional explanations further down.

As recommended by the https://html.spec.whatwg.org/multipage/ ... ml#charset (4.2.5.4 Specifying the document's character encoding), add your charset declaration early (before any ASCII (American Standard Code For Information Interchange) art to avoid a potential encoding-related security issue in IE, (If anyone is still using I.E). It should come in the first 1024 bytes.

Important: The <meta> tag must appear in the document before any content that could be controlled by an attacker, such as a <title> tag containing a dynamically generated title for the document.

The meta tag for compatibility mode (The X-UA-Compatible Meta tag) needs to be before all elements except title and meta.

X-UA-Compatible Meta Tag

Line 5:
<meta http-equiv="X-UA-Compatible" content="IE=edge">
This makes sure the latest version of IE is used in versions of IE that contain multiple rendering engines. Even if a site visitor is using IE8 or IE9, it's possible that they're not using the latest rendering engine their browser contains.

The meta tag tells the IE rendering engine it should use the latest, or edge, version of the IE rendering environment.

This meta tag ensures that anyone browsing your site in IE is treated to the best possible user experience that their browser can offer.

This line breaks W3C validation but is necessary for the best experience using Internet Explorer. This is actually the only line anywhere currently in the default design, that causes a validation error. We strive to make the HTML fully W3C compliant and valid, for several reasons, but this line is the one exception. It is the best solution to make sure the website displays the best way possible in Internet Explorer.

Alternative: Add the following lines to the top or bottom of your .htaccess file:
<IfModule mod_headers.c>
Header set X-UA-Compatible "IE=edge"
</IfModule>
You would remove the X-UA-Compatible meta tag from all of your templates, then place the above lines in your .htaccess file. Note that this is compatible with the SEO addon, simply add the lines below the content generated by the SEO addon.

Note that we would have preferred to use this option, however it relies on the Apache headers module, and also requires adding lines to the .htaccess file, which would be adding a little more work than we wanted to add for every single site. Not to mention it would not work for IIS servers. So instead, we can live with having one single "validation error" in exchange for making things a lot easier on site owners. Note that despite this one error, we still put top priority on making sure the default design and software produces fully W3C compliant HTML (other than this one error).

Using non-standard Port


If you are serving your site on a non-standard port, you will need to set the X-UA-Compatible header on the server-side. This is because the IE preference option 'Display intranet sites in Compatibility View' is checked by default.

Title

Line 6:
<title>{module tag='module_title'}</title>
The title, by default, is generated by the title module within the software. This module has several configuration settings within the admin of the software, that control what is displays on pages. Most sites should leave this as-is to allow the title module to generate the title based on the current page being viewed.

Description Meta Tag

Line 7:
<meta name="description" content="">
The templates come with a blank description, to allow you to enter your own. Generally you would enter a brief description of your site in this meta tag.

Since this particular meta tag has a lot of implications with Search Engine Optimization (SEO), we will briefly mention a few things regarding SEO below.

First you might notice, the templates do not come with keywords meta tag, for a very good reason: all modern search engines basically ignore keywords (this is according to google, https://developers.google.com/search/bl ... s-meta-tag). Note: do not confuse this with keywords on your website, we are only speaking about the keyword meta tag here.

The description meta tag on the other hand, is used by search engines, primarily as the description used in the search results. As recommended by google, you should avoid "keyword stuffing" in the description. Keep in mind this description will display below search engine results for your site, if someone sees an incoherent jumble of keywords there instead of an actual description, they are likely to not click on the result.

That said, let us make it clear that the choice on how the meta tags appear on your site is entirely up to you. We recommend to do some research before changing things too much, and avoid "snake oil" companies promising to make your site rank #1… Google Webmaster Tools is a great resource for finding reliable information about the best ways to make your site search engine friendly.

Mobile Viewport

Line 8:
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">


There are a few different options that you can use with the viewport meta tag, each option separated by comma in the "content" parameter.

Here are the default options used by the templates:

width=device-width

This tells the mobile device to set the overall width of the page to be the same as the device width. This is pretty standard for RWD websites.

initial-scale=1

Tells the mobile device to start with a scale of 1.0, which basically means at the normal scale without being zoomed in or out. This also is pretty standard for RWD websites.

user-scalable=no

This prevents the user from being able to use pinch to zoom, and more importantly, prevents the mobile device from "auto zooming" when the user taps on a field to select a value or type in something into the text box.

We would prefer to not use this option, as we feel it is good to let users zoom in on a part of the page if they want to for whatever reason, for instance to zoom in on an image or to see something more clearly. However, both Android and iOS (iPhone) automatically zoom in when you tap on an input field such as a search box or similar, and the bad part, they do not zoom back out when you are done on the field. So after you interact with any input field, your view will be zoomed in. At this time, the user-scalable=no is the most elegant and easiest way to prevent this undesired behavior.

If you would prefer to allow zooming at the expense of the problems with "automatic zooming in", feel free to remove the ", user-scalable=no" portion from the meta tag, but just be aware of the above mentioned usability problems that may happen as a result.

{head_html}

Line 10:
{head_html}
This line is required, do not remove it or your entire website design will break! This is a smarty tag, that is unique to the software.

You can read more information about this tag in the design section. Basically this will automatically generate the contents needed to include CSS, JS, and other resources required by the software itself.

Many people ask "what template creates the {head_html} tag", the answer is none: The contents are dynamically generated by many different parts of the software, there is no "one template" that generates the contents. It will change from page to page and even from user to user in some cases. So just make sure it appears in the template at roughly the area that it is at.

RSS Feed

Lines 12-13:
<!-- This loads the RSS feed -->
<link rel="alternate" type="application/rss+xml" title="Newest Listing Feed" href="rss_listings.php" />
This line informs browsers about the RSS feed for your site. Some browsers, such as Firefox, will then have options to "subscribe" to your website, which will basically make the browser monitor the RSS feed for new listings that would show in the RSS feed.

head_common.tpl

Line 15:
{include file='head_common.tpl'}
This line is a Smarty include tag, what it does is "include" the head_common.tpl template. This same sub-template is included in all of the overall templates.

This allows you to add "common" things to all of your pages, and only edit a single template file head_common.tpl. For instance, if you wanted to insert a custom JS script, you might do it in this sub-template.

Note that in the past (versions before 7.3), the default design actually used a head.tpl which contained all of the lines described in this section. In 7.3 the design now breaks away from that, as it makes it more difficult to customize certain things specifically for certain pages. For instance, if desired, it is now much easier to use a different title (other than the title module) on a specific page, while the rest of the pages on the site continue to use the module title like normal.

Modernizr

Line 16:
<script src="js/modernizr-2.6.2.min.js"></script>
The software comes with a custom build of https://modernizr.com/ (using the one shipped with the HTML5 Boilerplate project).

Modernizr is a JavaScript library which adds classes to the html element based on the results of feature test and which ensures that all browsers can make use of HTML5 elements (as it includes the HTML5 Shiv). This allows you to target parts of your CSS and JavaScript based on the features supported by a browser.

Needs to load right before </head> tag:

In general, in order to keep page load times to a minimum, it's best to call any JavaScript at the end of the page using the {footer_html} tag, because if a script is slow to load from an external server it may cause the whole page to hang. That said, the Modernizr script needs to run before the browser begins rendering the page, so that browsers lacking support for some of the new HTML5 elements are able to handle them properly. Therefore the Modernizr script is the only JavaScript file that is not combined with other JS and not delayed in {footer_html}, it is the only one synchronously loaded at the top of the document. Doing so also helps to prevent FOUC.

Old IE CSS

Line 17:
<script>Modernizr.load({ test: Modernizr.mq('only all'),nope:'{external file="css/old_ie.css"}'});</script>
This uses Modernizr, to load the old_ie.css CSS file, but only for browsers that do not support media queries, which will be Internet Explorer 8 (IE8) and below. This is needed for IE8 and below to work because the design uses a lot of CSS3 techniques that IE8 is simply too old to work with. The old_ie.css file contains compatibility CSS, for instance it expresses font sizes in pixel size rather than root em (rem) units. It also has CSS to make IE8 always show like it is the large desktop size, necessary since media queries do not work in IE8.

If you do not want to support IE8 and below on your own site, you can remove this line for very slightly smaller5) page size.

Internet Explorer Support:

Over time the line may be removed once usage of IE8 and below drops. At the current time we support Internet Explorer 8 enough to make sure things "work" in the old browser, but the experience will probably not be as good as a modern browser. Since many government agencies still rely heavily on the old browser, we will continue to support it6). Note that we do NOT support Internet Explorer 7 or below because such browsers can be upgraded to IE 8, and because usage of IE7 and below has dropped over the last few years to almost nothing.

Wrapper (CSS Class)

There is one div that "wraps" the entire contents, that will have a class of "wrapper". With CSS you can actually have multiple classes on a single element, separated by space. That is the case with the wrapper as well, it will have one additional class, one of three:
  • one-column - used in layout-1-column.tpl
  • two-column - used in layout-2-column.tpl
  • three-column - used in layout-3-column.tpl
This second CSS class acts to organize the different sections of the page, into either a 1 column, 2 column, or 3 column layout on desktop sized screens.

header.tpl

This is another "include" sub-template. This is where the top menu / logo resides.

Browsehappy

This section displays on Internet Explorer 6, linking such visitors to https://browsehappy.com/ to upgrade to a modern secure browser.

main

This is the "main" section, where the main column contents go. Note that this is above the sidebars when you are viewing the template HTML. This is how RWD works, the main content appears before the side content so that on smaller screens, when those side-bars are displayed full width, they go below the main content and you must scroll down to see them.

This section is used in all 3 layouts.

sidebar

This is the left sidebar, it will be directly below the main section.

This is used in layout-2-column.tpl andlayout-3-column.tpl.

sidebar2

This is the right sidebar, only used on the 3 column layout in layout-3-column.tpl. The only "build in" page that uses all 3 columns are the listing details templates.
1kiwi1
Site Admin
Posts: 204
Joined: Mon Nov 19, 2018 9:26 pm

Re: Design Configuration - Header Changes in Default Design

Post by 1kiwi1 »

Header Changes in Default Design

This support wiki page concerns all the links that appear in the header of the default design. All the changes within this page would be affected in the header.tpl template.

Changing the Home to Help Links

This section of this support article concerns the links in the red circle here of the default design:
links_in_header.png
links_in_header.png (39.49 KiB) Viewed 5446 times
To edit the above links in the html you'll edit the header.tpl file of your custom template set using the DESIGN > MANAGER admin tool. Look for the following block of html:
<nav class="page-bar fixed-menu">
<a href="index.php" class="menu-link">Home</a>
<a href="index.php?a=1" class="menu-link">Sell</a>
<a href="index.php?a=19" class="menu-link">Search</a>
{addon addon='storefront' tag='list_stores_link' no_li=1}
<a href="index.php?a=28&amp;b=135" class="menu-link">Features</a>
<a href="index.php?a=28&amp;b=143" class="menu-link">Pricing</a>
<a href="index.php?a=28&amp;b=141" class="menu-link">Help</a>
<a href="index.php?a=28&amp;b=142" class="menu-link extra">About Us</a>
<a href="index.php?a=28&amp;b=136" class="menu-link extra">Contact Us</a>
</nav>
In the above code you see the links to change if you like. To add another link in the list of links simply add another <a href="URL" class="menu-link"> … </a> to the list in the order you want it to show. The "class" determines which menu it will appear in. If it has class of "menu-link" it will show in the menu for small screens / mobile devices. If you use class "menu-link extra", that link will ONLY show on the mobile menu. This is specifically for "about us" and "contact us" links, which are not part of the menu tabs on the desktop view.

Note that the "stores" link will only appear if that addon is installed and enabled AND at least one live store in the software.

Editing the Extra Pages a Few of Those Link to

You would make these changes in your custom template set. To edit the contents of the "features" page look to make changes in the following template:
/main_page/extra_pages/seller_buyer_features.tpl
To edit the contents of the "Pricing" page look to make changes in the following template:
/main_page/extra_pages/pricing.tpl
And no the above page is NOT dynamically generated. The variety of ways that pricing can be setup within the software and the amount of time it would take to make the above page dynamic is prohibitive and most likely not the way you would want it to display. So we leave this one for you to edit.

To edit the contents of the "help" page look to make changes in the following template:
/main_page/extra_pages/help.tpl
Changing the About Us and Contact Us Links

The section of this support wiki article concerns the links circled in the following screenshot:
about_contactl_links_in_header.png
about_contactl_links_in_header.png (33.58 KiB) Viewed 5445 times
Edit the header.tpl file in your custom template set using the DESIGN > MANAGER admin tool and look for the following code:
<ul id="extra_links">
<li><a href="index.php?a=28&amp;b=142">About Us</a></li>
<li>|</li>
<li><a href="index.php?a=28&amp;b=136">Contact Us</a></li>
</ul>
You can see the links in the code and the "about us" and "contact us" text we use. You can change those links/text to what you like. You also add another link next to the above that will use the same css formatting by adding your own code like this:
<li>|</li>
<li><a href="some url">Some Text</a></li>
Change the Page the About Us Link Goes to

You would make these changes in your custom template set. To edit the contents of the "Contact Us" page look to make changes in the following template:
/main_page/extra_pages/about_us.tpl
Changing the Register/Login or My Account/Logout Links

This section of the support wiki concerns the links circled in the following screenshot:
register_login_links_in_header.png
register_login_links_in_header.png (32.94 KiB) Viewed 5445 times
You would edit the header.tpl template within your custom template set using the DESIGN > MANAGER admin tool and look for the following code:
<div class="fixed-menu clearfix user-bar">
{addon addon='social_connect' tag='facebook_session_profile_picture'}
<div class="user-welcome">Welcome, {module tag='display_username'}</div>
<span class="user-links">
{if not $logged_in}
{*Logged out code*}
<a href="register.php" class="menu-link">Register</a>
<a href="index.php?a=10" class="menu-link">Login</a>
{else}
{*Logged in code*}
<a href="index.php?a=4" class="menu-link">My Account</a>
<a href="index.php?a=17" class="menu-link">Logout</a>
{/if}
</span>
{addon author='geo_addons' addon='social_connect' tag='facebook_login_button'}
</div>
The first difference you see is that the above has Smarty code in it. That Smarty code checks to see if the current client looking at that page is logged into the system or not. If the current user is not logged into your Geo software they would see the "register/login" links. If they were logged into the Geo software they would see the "my account/logout" links. Seeing the above code you should see how easy it would be to add text to the system that would only display something to users that are logged in or display something that would only display to users not logged into the Geo system. Just use the basic Smarty loop shown below:
{if not $logged_in}
{*Logged out code*}

{else}
{*Logged in code*}

{/if}
Changing the Social Sharing Buttons at the Top Right of the v7.3.0 and Up Default Design

This tutorial page concerns the social sharing links circled in the following default design image:
footer-v7-3-0-share-icons.png
footer-v7-3-0-share-icons.png (31.07 KiB) Viewed 5443 times
These links by default are in the footer.tpl template. These social media icons are just for illustration purposes and while they do link to their respective sites there is no specific functionality attached to them. Their intended purpose is for you the site owner to link to your "site accounts" on those sites using those links. To find the code to edit to insert your "social site urls" for each of those you will need to edit the header.tpl template using the following admin tool:
DESIGN > MANAGER
And edit the footer.tpl template in the /main_page directory of your custom template set. Look for the following code to make your changes:
<nav class="social-contacts">
<a href="#" title="Facebook"><img src="{external file='images/icons/social/facebook.png'}" alt="Facebook" /></a>
<a href="#" title="Twitter"><img src="{external file='images/icons/social/twitter.png'}" alt="Twitter" /></a>
<a href="#" title="Google+"><img src="{external file='images/icons/social/google+.png'}" alt="Google+" /></a>
<a href="rss_listings.php" title="RSS Feed"><img src="{external file='images/icons/social/rss.png'}" alt="RSS Feed" /></a>
</nav>
You can see the "#" within all those links? Those would be what you would change to point to your social accounts. The facebook and twitter account url's would look something like:
But of course pointing to your accounts. You can also edit the code above to remove specific links you will not use.

Changing the Social Sharing Buttons at the Top Right of the v7.0 to v7.2.5 Default Design

This tutorial page concerns the social sharing links circled in the following default design image:
social_links_in_header.png
social_links_in_header.png (34.82 KiB) Viewed 5442 times
These links by default are in the header.tpl template. These social media icons are just for illustration purposes and while they do link to their respective sites there is no specific functionality attached to them. Their intended purpose is for you the site owner to link to your "site accounts" on those sites using those links. To find the code to edit to insert your "social site urls" for each of those you will need to edit the header.tpl template using the following admin tool:
DESIGN > MANAGER
And edit the header.tpl template in the /main_page directory of your custom template set. Look for the following code to make your changes:
<!-- START SOCIAL LINKS -->
<div id="social_links">
{* social hover buttons from http://www.marcofolio.net/css/display_s ... _css3.html *}

{* Change each of the links below to link to your site's page for
that social site, or remove any that you do not wish to use *}
<!-- Social Media Buttons - jQuery -->
<ul class="social" id="social_hovers">
<li class="facebook">
<a href="http://www.facebook.com/"><strong>Facebook</strong></a>
</li>
<li class="twitter">
<a href="http://twitter.com/"><strong>Twitter</strong></a>
</li>
<li class="delicious">
<a href="http://www.delicious.com/"><strong>Deli ... strong></a>
</li>
<li class="flickr">
<a href="http://www.flickr.com/"><strong>Flickr</strong></a>
</li>
<li class="linkedin">
<a href="http://www.linkedin.com/"><strong>LinkedIn</strong></a>
</li>
<li class="reddit">
<a href="http://www.reddit.com/"><strong>Reddit</strong></a>
</li>
<li class="rss">
<a href="http://feeds2.feedburner.com/marcofolio ... strong></a>
</li>
</ul>
</div>
<!-- END SOCIAL LINKS -->
You can see the "http://www.facebook.com/", "http://twitter.com/", … etc url's in the above code. Those would be what you would change to point to your social accounts. The facebook and twitter account url's would look like:
You can also edit the code above to remove specific links you will not use. For example to remove the reddit link you would remove the following code from that above in your header.tpl template:
<li class="reddit">
<a href="http://www.reddit.com/"><strong>Reddit</strong></a>
</li>
1kiwi1
Site Admin
Posts: 204
Joined: Mon Nov 19, 2018 9:26 pm

Re: Design Configuration - Specific HTML Elements of Default Design - Header Layout

Post by 1kiwi1 »

Header Layout

This wiki page will go over the layout for the header section in the default design. The header section is contained in the sub template file header.tpl. Below is an explanation of how the different parts work together, by understanding this you will be able to better customize the look to your own desires.

Since this uses RWD that responds to the size of the screen, in each instance it will first show the "small view", then the "large view", and any other "breakpoints" in between if there are any. This will give you an idea of what changing something will affect in the different screen sizes.

Overall Header Layout

The entire header for each page is contained in the sub template header.tpl. The header uses HTML 5 <header> tags like so:
<header class="page clearfix">
...
</header>
Note that you can have multiple <header> tags contained within the same page. For this reason, we also use CSS classes so that we can uniquely style the main "page" header, using the .page CSS class. That way you are free to use the <header> tag yourself for your own custom design without worrying about the default CSS attempting to style your own header. Note that the clearfix class is a special helper class to make sure any "floating" contents inside the <header> will not over-flow below the boundaries of the header1). The clearfix class can be used on any "container" element that has floating elements inside it.

Small View (Mobile):
header-overall-small.png
header-overall-small.png (16.12 KiB) Viewed 5441 times
The screenshot above shows the "header" as it will look in the small view, when either your browser width is small enough, or you are on a mobile device.

First Breakpoint: 50em (800px) wide and "up":
header-overall-50em.png
header-overall-50em.png (25.27 KiB) Viewed 5441 times
The screenshot above shows what the header looks like at the minimum width of 50em2) which is the first and only media breakpoint min-width that affects the header. There are other media break-points, but this is the only one that has a direct effect on the header layout. If your browser window is at least 50em (800px) the layout will change from the small header layout displayed in the first screenshot, to the larger layout above. Note how the logo now has a background behind it, and there are menu items and links and such displayed in the larger version. In the smaller version, those menu options are "tucked away", accessed by tapping on the menu icon in the top bar.

Header Logo

Small View (Mobile):
header-logo-small.png
header-logo-small.png (19.23 KiB) Viewed 5441 times
First Breakpoint: 50em (800px) wide and “up”:
header-logo-50em.png
header-logo-50em.png (27.88 KiB) Viewed 5441 times
The same HTML markup is used for both the small and the larger view of the logo. The HTML below:

Code: Select all

	<!-- START LOGO / BANNER TOP -->
	<div class="logo-box" title="Website Name">
		<a href="index.php" class="logo" title="Website Name">
			<!-- Logo image OR Logo text goes here!  To use text, remove the
				image tag below and replace it with text -->
			<img src="{external file='images/logo.jpg'}" alt="Website Name" title="Website Name" />
		</a>
		<a href="index.php" class="slogan" title="Website Name">
			<!-- Slogan text goes here, if you want to add a slogan that shows
				under the logo text or logo image. -->
		</a>
	</div>
The first thing you will want to change, is the title="Website Name", change all of them to match your own website name. There are 4 places to change that in the above HTML snippet. You will also want to adjust the alt="Website Name" that is part of the <img> tag for your logo.

There are different ways to display a logo, and the software has used a few different ways in the past. The current way actually inserts the logo as an image in the HTML. In the large view, it also will have a background image that works to separate the logo from the menu.

It uses the above method for a few different reasons. The first is that it is the most semantically "descriptive" in the HTML code, it is pretty obvious that this is a logo image that links to the home page. Other methods, for instance using the logo image as the background image, are not as semantic and give the search engines less to go on. By having the image tag directly in the HTML instead of using a BG image for the logo, you can set ALT and TITLE attributes on the image so that it can be one more thing for the search engines to identify for your site.

In the small view, if your logo is a larger width than the screen size, it will be resized to 100% screen width. That way users do not have to scroll just to see your full logo image. Although this is not very noticeable with the default logo being just 275px wide, if you use a larger logo you will notice this come into play.

Change the Logo

To change the logo, upload your replacement logo image to my_templates / external / images / logo.jpg. We recommend using a logo at about the same dimensions as the starting default template for best results. You can use a different size but you may need to make adjustments to the CSS for other parts of the header.

Use a Text Slogan

This is not often used, but it may be a good idea! Not only will it give your visitors something to help identify and remember your site, but the slogan text is actual text, not a graphic. This helps with SEO as well, it allows search engines to pick up on your slogan text so that the text is not "locked inside" an image, that would otherwise make your slogan invisible to search engines.

To start using a slogan, just insert your text slogan into the right place, the header.tpl already has a ready-made place to do this, in the section below:
<a href="index.php" class="slogan" title="Website Name">
<!-- Slogan text goes here, if you want to add a slogan that shows
under the logo text or logo image. -->
</a>


For instance, if you wanted to use the slogan Greatest Site in the Multiverse!, it might look like this:

<a href="index.php" class="slogan" title="Website Name">Greatest Site in the Multiverse!</a>

Note that in the sample above, we went ahead and removed the HTML comments, since it should be pretty obvious that this is your slogan. Also removing the comments results in smaller size, so faster page loading.

Be sure to Test Your Changes to make sure that the slogan displays like you want. We have set up the default styles for the slogan, such that it should look good for a variety of different slogan lengths, on multiple size screens, but it is still good to test. Also consider making your slogan short and sweet, something that is easy for your visitors to remember and something unique to your site.

You can actually use the slogan instead of the logo graphic if you want! To only use the slogan, remove this section from the header.tpl:

Code: Select all

		<a href="index.php" class="logo" title="Website Name">
			<!-- Logo image OR Logo text goes here!  To use text, remove the
				image tag below and replace it with text -->
			<img src="{external file='images/logo.jpg'}" alt="Website Name" title="Website Name" />
		</a>
And as always, be sure to Test Your Changes to make sure everything lines up correctly with only using the slogan.

If you want to remove the slogan altogether, in order to reduce the page size a little, you can remove the entire slogan section below:
<a href="index.php" class="slogan" title="Website Name">
<!-- Slogan text goes here, if you want to add a slogan that shows
under the logo text or logo image. -->
</a>
Main Menu Links
The below explains how the main menu links work:

Small View (Mobile):
header-menu-small.png
header-menu-small.png (44.42 KiB) Viewed 5438 times
The main menu is exposed in the small (mobile) view by tapping on the menu icon in the top left corner, as illustrated in the screenshot above.

First Breakpoint: 50em (800px) wide and “up”:
header-menu-50em.png
header-menu-50em.png (36.19 KiB) Viewed 5438 times
As illustrated in the screenshot above, the main menu links are displayed by default in the 50em and up media breakpoint. This is because 50em (800px) is the smallest width that the entire menu can "comfortably" display without causing the menu to wrap to a second line, or cause a horizontal scrollbar, or other similar undesired effects. Even though these 2 versions looks completely different, they are actually both displaying the same "contents", but using a media break-point to style them completely differently.

Below is the "HTML Code", this is from the header.tpl template:
<nav class="fixed-nav">
<a href="#page-bar" class="fixed-link menu"></a>
...
<nav class="page-bar fixed-menu">
<a href="index.php" class="menu-link">Home</a>
<a href="index.php?a=1" class="menu-link">Sell</a>
<a href="index.php?a=19" class="menu-link">Search</a>
{addon addon='storefront' tag='list_stores_link' no_li=1}
<a href="index.php?a=28&amp;b=135" class="menu-link">Features</a>
<a href="index.php?a=28&amp;b=143" class="menu-link">Pricing</a>
<a href="index.php?a=28&amp;b=141" class="menu-link">Help</a>
<a href="index.php?a=28&amp;b=142" class="menu-link extra">About Us</a>
<a href="index.php?a=28&amp;b=136" class="menu-link extra">Contact Us</a>
</nav>
...
</nav>
Note that parts not dealing directly with the main menu have been skipped, denoted by the …. The last </nav> may not directly relate to this menu, but we chose to include it in the example above to emphasize the importance of paying attention to opening and closing HTML tags.

Now to break it up some to explain each part below.

Small View Menu Icon
<a href="#page-bar" class="fixed-link menu"></a>
This line adds the menu icon in the top right corner for the small (mobile) view. This is how it works, so that you can make use of this yourself for your own changes:

The class fixed-link is a special class, that does something in JS: If a link has this class, it will take the href value hash, remove the #, and use the result to find any elements on the page that has a matching CSS class. In this case, it uses #page-bar, so the JS looks for any elements on the page with the class page-bar. If that element is currently "hidden"5), it will use jQuery to quickly "show" it using an animation. And conversely, if it is already not hiding, it will hide the element, again using an animation built into jQuery.

This functionality is built in, and can be re-used, your requirements for using this: Use an <a> tag similar to this:
<a href="#class-name" class="fixed-menu"></a>
Hint: you can add something inside the <a>…</a> tag (see the snippet above) like an image, and it will display on top of the button. Images inside this link will be styled to match the width / height of the button. The social connect addon does this when you are logged in with FB account to show the profile pic on top of the normal user menu link. Just doing this will show something that looks like the menu in the top left corner, you can further style it, even totally change it's look, by adding a second class to the <a> tag and using that to style it as needed.

The second part, now create a <div> (or other block element) with class class-name. You can change the class-name to whatever you want, just make sure the href and the class in your element match up. Then when the user taps on your menu item, it will show/hide the element matching the class.

If this functionality interests you but you want to use it for a text link, you might look into using section-collapser

Code: Select all

		<nav class="page-bar fixed-menu">
			<a href="index.php" class="menu-link">Home</a>
			<a href="index.php?a=1" class="menu-link">Sell</a>
			<a href="index.php?a=19" class="menu-link">Search</a>
			{addon addon='storefront' tag='list_stores_link' no_li=1}
			<a href="index.php?a=28&amp;b=135" class="menu-link">Features</a>
			<a href="index.php?a=28&amp;b=143" class="menu-link">Pricing</a>
			<a href="index.php?a=28&amp;b=141" class="menu-link">Help</a>
			<a href="index.php?a=28&amp;b=142" class="menu-link extra">About Us</a>
			<a href="index.php?a=28&amp;b=136" class="menu-link extra">Contact Us</a>
		</nav>
The HTML code above controls the menu links. This same HTML is used to display the smaller, and the larger view.

Adding / Changing Menu Links


If you would like to add your own link to the top, you would insert your own <a> in the order you would like. The format for the link will need to be:
<a href="link_url" class="menu-link">Menu Link</a>
You can also remove items, or change the order of the links if you wish. When doing so, make sure you are copying the "entire" link entity, starting with <a …> tag and ending with the </a> tag similar to what is in the code snippet above. Make sure you do not leave out any part of it or move/remove "too much".

Remember to Test Your Changes when you make any changes to the menu!

Extra CSS class
<a href="index.php?a=28&amp;b=142" class="menu-link extra">About Us</a>
<a href="index.php?a=28&amp;b=136" class="menu-link extra">Contact Us</a>
You may notice in the screenshots, that the small view includes the "contact us" and "about us" links at the bottom, and the 50em breakpoint larger view, those are not part of the main menu. This is done by using the extra class on the link, any links that have this class will not be displayed in the larger breakpoint.

We want to make it clear that we (Geocoremax) strongly discourage having any parts of the page inaccessible to one size or another. You can see the Philosophy page for more info. In this case, even though the links are displayed on the small view and hidden on the larger breakpoint if they have the extra class, those same links are replicated as text links above the main menu. So it is used as a way to basically move where the link appears in one view or the other. It is usually not a good idea to completely hide a link in one view or another7) without providing the link in an alternate location "close to" the original.

About Us / Contact Us Links

Small View (Mobile):
header-about-links-small.png
header-about-links-small.png (19.35 KiB) Viewed 5437 times
Note that in the small view, the about us and contact us links are made to be part of the main menu, tucked away so that you tap on the menu icon in the top left corner to view.

First Breakpoint: 50em (800px) wide and “up”:
header-about-links-50em.png
header-about-links-50em.png (26.39 KiB) Viewed 5436 times
The about us and contact us links are done a little differently. This is one of the very few places that the small view and the larger view are displayed by different markup.

Note that we advise to avoid this technique as much as possible. We actually did come up with a solution that still used the same markup for both, but it was so complex that it actually took more markup then having 2 versions of the same thing in the HTML, so we opted to make an exception in this case.
<nav class="extra-links">
<a href="index.php?a=28&amp;b=142">About Us</a>
|
<a href="index.php?a=28&amp;b=136">Contact Us</a>
</nav>
<nav class="page-bar fixed-menu">
...
<a href="index.php?a=28&amp;b=142" class="menu-link extra">About Us</a>
<a href="index.php?a=28&amp;b=136" class="menu-link extra">Contact Us</a>
</nav>
The small view is displayed with the 2 <a> tags near the bottom of the snippet above. The large view is displayed by the <nav class="extra-links"> section at the top of the snippet.

In the small view, the .extra-links is hidden with CSS. In the large view, .extra is hidden with CSS. The result is that in the small view, the about us and contact us links are "tucked away" in the expanded menu at the bottom, and in the larger view those show as text links that sit right above the main menu.

Tip: This technique can act as an example of how you might do something similar in your own custom design, display something as "part of" one section in one view but part of an entirely different section in another view, by using different HTML for each view and showing/hiding the different versions using CSS.

You should use this sparingly / as a last resort. We only went with this technique for the about us / contact us links, because to accomplish the same effect using a technique to still share the same HTML for both, would have actually resulted in more complex and "larger" amount of HTML than simply having the links use different HTML for the different views. So it made things less complex and less HTML for the browser to download in that specific case.

Adding / Changing About/Contact Links

To add an additional link, you would add your link to 2 places:

First, you would add this to the top part inside the <nav class="extra-links"> section:
|
<a href="#">My Link</a>
Note the "pipe" character | before the link to separate it from the other text links.

The second part, you would add to the bottom of the <nav class="page-bar fixed-menu"> section below the about and contact us links in that section:
<a href="#" class="menu-link extra">My Link</a>
Note the use of the CSS classes "menu-link extra".

If you were adding the sample link above for "My Link" the finished snippet would look like this (this time we'll include the entire snippet without any parts skipped):
<nav class="extra-links">
<a href="index.php?a=28&amp;b=142">About Us</a>
|
<a href="index.php?a=28&amp;b=136">Contact Us</a>
|
<a href="#">My Link</a>
</nav>
<nav class="page-bar fixed-menu">
<a href="index.php" class="menu-link">Home</a>
<a href="index.php?a=1" class="menu-link">Sell</a>
<a href="index.php?a=19" class="menu-link">Search</a>
{addon addon='storefront' tag='list_stores_link' no_li=1}
<a href="index.php?a=28&amp;b=135" class="menu-link">Features</a>
<a href="index.php?a=28&amp;b=143" class="menu-link">Pricing</a>
<a href="index.php?a=28&amp;b=141" class="menu-link">Help</a>
<a href="index.php?a=28&amp;b=142" class="menu-link extra">About Us</a>
<a href="index.php?a=28&amp;b=136" class="menu-link extra">Contact Us</a>
<a href="#" class="menu-link extra">My Link</a>
</nav>
You can also change the order or remove the about us and contact us links altogether. Whatever you decide to do, we strongly recommend that you mimic that in both the large and small views, it can be a bad idea to make a link completely inaccessible from one view or the other. It would also go against RWD principals in general, part of the reason to use RWD over a dedicated "mobile only" site is that you are not limiting what the visitor can do just because they are on mobile device. That said, this is your site of course so the choice is ultimately yours! :)

Tip: The "extra" links can actually be inter-mixed in the small view menu if you want to do so, although it may be a little confusing, you can if you want to! For instance, if you want you can move the "about us" link to be the 2nd in the menu right below "home", or anywhere else within the small view menu. As long as it includes the extra class that will not show in the large view so that you can display it in the text links above the main menu.

Also be sure to Test Your Changes whenever you make changes like this!

User Links

Small View (Mobile):

header-user-links-small.png
header-user-links-small.png (27.42 KiB) Viewed 5435 times
Note that user links are tucked away on the small view. As illustrated above, you would click / tap on the icon in the top right corner to expand the user links in the small view.

First Breakpoint: 50em (800px) wide and “up”:
header-user-links-50em.png
header-user-links-50em.png (24.11 KiB) Viewed 5435 times
This is another part of the design, that even though the "look" is drastically different, it was accomplished with the exact same HTML markup for both views:
<nav class="fixed-nav">
...
<a href="#user-bar" class="fixed-link user">{addon addon='social_connect' tag='facebook_session_profile_picture'}</a>
...
<!-- START USER BAR -->
<div class="abs-space"></div>
<div class="fixed-menu clearfix user-bar">
{addon addon='social_connect' tag='facebook_session_profile_picture'}
<div class="user-welcome">Welcome, {module tag='display_username'}</div>
<span class="user-links">
{if not $logged_in}
{*Logged out code*}
<a href="register.php" class="menu-link">Register</a>
<a href="index.php?a=10" class="menu-link">Login</a>
{else}
{*Logged in code*}
<a href="index.php?a=4" class="menu-link">My Account</a>
<a href="index.php?a=17" class="menu-link">Logout</a>
{/if}
</span>
{addon author='geo_addons' addon='social_connect' tag='facebook_login_button'}
</div>
<!-- END USER BAR -->
</nav>
Note that the other parts of the header not specifically dealing with user links were skipped over in the snippet above for brevity, denoted by … in the snippet.

The first part displays the user menu icon in the small view, in the top right corner of the page. See Small View Menu Icon for general information about how the fixed-nav menu links work. The one for the user menu has the added class user, which is used to apply additional styles to that button in CSS. In particular, it shifts the background image so that it uses the part with a little stick man in the menu. Both menu links use the same image background, but "half" of the image is used for one menu item and the other half is used for the other icon. In this case it uses the right side of the background image if you wish to change the menu icon. The image to change is:
external/images/icons/menu.png
The user menu icon also does something else, it uses the addon tag from the Social Connect addon that displays the current logged in user's profile picture if it is available. Note that this is only displayed if the Social Connect addon is installed, enabled, and configured correctly, AND the user is logged in with an account that is linked to a Facebook profile.

If you wish to remove that from showing, the part to remove is the complete addon tag:
{addon addon='social_connect' tag='facebook_session_profile_picture'}
User Menu Contents

The actual contents of the user menu, use the same HTML markup as mentioned earlier. The result is a very "slim" piece of HTML code, which is always good to make the overall size smaller, and thus faster to download for mobile devices. But this does lend itself to being a little complex, so below we will explain how each part works so that you can customize it and hopefully get the results you want.
<div class="abs-space"></div>
This acts as a "spacer" for the large view, so that the user text and links do not go "behind" the main menu due to the layout for the main menu. If you make changes that affect the height of the main menu, you may need to adjust the height for the abs-space block. You can do so with the following CSS, placed in your own custom.css file:
@media only screen and (min-width: 50em) {
/* ==========================================================================
Shared Breakpoint: 50em is about size that all "default" menu items fit
horizontally on the page, may need to adjust this for different
languages or if you have more / less menu items than default.

Breakpoint For: Menu Bar | Logo
========================================================================== */
/* user bar acts as the bar across the top */
.abs-space {
height: 6.1em;
}
/* Other customized CSS in the 50em breakpoint here */
}
In that example snippet, you would change 6.1em and adjust it as needed. Remember, EM unites are based on font size, and using them make your site more accessible and fluid. 1 em is the width of one character at the current font size. Use that as a guide when adjusting, so if it looks like you need to "shift down" by about what would be 1 line, try using 7.1em and see if that works. Once you get the general size adjusted you can "home in" and make fine adjustments in .1 increments if needed.

A quick note on media breakpoints in your custom CSS: In your custom.css file, when adjusting the CSS for something inside of a breakpoint, you will need to include the start of the breakpoint and the end as well. When you do so, make sure you do not have multiple declarations of the same break-point, in other words don't have multiple sections starting with:
@media only screen and (min-width: 50em) {


You will want to combine all of your customized CSS for that breakpoint, into the same breakpoint section… In other words, say you want to also customize .user-welcome class, you would avoid having a second @media line, and instead insert your CSS before the close } for the media breakpoint. For this reason it is good idea to keep your tabs / spaces "clean" meaning when you are "inside" a media breakpoint, make sure the contents are all indented by a tab, like they are in the sample above.</tip>

Next section:
<div class="fixed-menu clearfix user-bar">
This is the start to the user section. You will see the class user-bar, if you already read about how the main menu works this should already be familiar. As a reminder, the entire section with the class user-bar is automatically expanded / collapsed when you tap on the link with the href #user-bar. See the Small View Menu Icon section for a more detailed description.

The clearfix class is added since there are floating elements in the large view, so that the floating elements don't "overflow" the user container resulting in parts overlapping on the page.

Next section:
{addon addon='social_connect' tag='facebook_session_profile_picture'}
If you have the social connect addon installed and enabled, and the user is logged in with an account that is linked to Facebook through the addon, this tag will display the user's profile picture. Note that this only happens if you use the social connect addon. You can safety remove this line if you do not wish to show the Facebook profile picture.

Next section:
<div class="user-welcome">Welcome, {module tag='display_username'}</div>
This is the Welcome, Guest part of the text. The module tag displays the user's username, or "guest" if no logged in. You can change the text as you wish just make sure to keep everything inside the <div> with the user-welcome class so that everything lines up in both views.

Next section:
<span class="user-links">
{if not $logged_in}
{*Logged out code*}
<a href="register.php" class="menu-link">Register</a>
<a href="index.php?a=10" class="menu-link">Login</a>
{else}
{*Logged in code*}
<a href="index.php?a=4" class="menu-link">My Account</a>
<a href="index.php?a=17" class="menu-link">Logout</a>
{/if}
</span>
Things inside the <span class="user-links">…</span>, in the large view, will use CSS3 to automatically surround the contents with (…) like you see in the large view. It uses similar techniques to insert a pipe "|" between each element.

This uses Smarty {if} tags to display one version if the person is not logged in, and something else if they are logged in. The first part, surrounded by {if not $logged_in}…{else} is what will display if the user is not logged in. By default it shows the register and login links. The section between {else}…{/if} is the second part of the if/else smarty tags, it will display if the user is logged in. By default it shows the my account link and the logout link.

Next section:
{addon author='geo_addons' addon='social_connect' tag='facebook_login_button'}
This is another Social Connect addon tag, it will only display if that addon is installed and enabled, and the user is currently not logged in. See facebook_login_button for more detailed explanation of how it works. This can be removed if you are using the social connect addon but do not want to show the login button in the header, or if you want to move it.

Test Your Changes

Geodesic developers have done lots of testing to make sure the "default design" looks good at different screen sizes and resolutions. When you add your own menu items, move them around, change the wording, or generally make any changes to the header.tpl template or CSS that affects it, you will need to do that testing yourself to make sure everything continues to look good for all your visitors.

Start off with your browser width set to be small. You may want to use Firefox with the plugin Developer Tools, if you do then simply use the shortcut CTRL+ALT+M to switch to a mode that lets you easily switch between different common sizes. Whether you use this or not, start your browser at around 300 pixels wide or so and test the parts you changed.

Slowly make the browser width wider and continue to monitor how your changes hold up. When dealing with the main menu, the breakpoint is based on the specific menu items that are in the default design, so you may need to adjust wording, or possibly consider removing some of the main links to avoid problems at the "low end" of the 800px breakpoint. You might also adjust the padding, width, font size, or other elements of the menu items if you need to squeeze more tabs in the header.

We have noticed that in Google Chrome, and possibly other browsers, as you make the window size larger and smaller and it goes across different breakpoints, sometimes things don't show or hide properly. We think this is a bug in the browser, and if you just refresh the page when it happens it should fix it. Note that the only time someone will ever see this, is if they too are playing with the width, so it is not a very common problem and should be fixed by newer versions of the browser. In every device we tested, switching from landscape to portrait mode and visa versa did not show any issues like this.

When you are testing the different screen widths, if it causes horizontal scroll bar, or causes the menu to go to a second line, you may have to consider re-wording some of the menu items, or perhaps removing any that are not essential to your site. You can also try adjusting the padding, width, and font size as well to allow more buttons to fit in the same space. Also be sure to test with a small screen width, down to 320px is the usual smallest size, just to make sure the menu looks good.

Note on changing breakpoint width: If you really need your menu to hold more items, the only way to do it might be to change the size of the breakpoint from 50em to something larger. Changing a breakpoint defined in the default CSS can be tricky to say the least, so make sure you have considered all alternatives before resolving to changing the breakpoint. This will need it's own dedicated tutorial to accomplish.

Note about Previous / Current Navigation HTML Markup

If you previously used a design from 7.2.5 or earlier, you may remember the default menu used to look something like this simplified snippet:
<ul>
<li><a href="#">menu item 1</a></li>
<li><a href="#">menu item 1</a></li>
</ul>
While this method works, we chose to switch to using HTML markup like this instead:
<nav>
<a href="#">menu item 1</a>
<a herf="#">menu item 2</a>
</nav>
We use this same <nav> markup anywhere that a list of navigation links need to be used. There are 2 main reasons we moved to this as the standard way to do navigation links:

First, the markup is much more semantic, it is very clear just looking at the HTML that you are dealing with navigation links. In fact that is exactly what it is, a <nav> tag (new HTML5 tag) with <a> link tags inside it, can't get much more clear and simple than that. The old "unordered list", while it is somewhat semantic, as it is indeed an unordered list of things.. Using the <nav> tag with links directly in it, we felt is very obvious, the list tags are almost redundant as it is pretty obvious these are a list of links.

The second reason, which is actually the main reason for adopting this rather than sticking with what we used before: less markup. When it comes to HTML, less is more, the less HTML there is, the less the browser / device has to download, the less the browser has to process, the faster the page will load. In some cases, with really long lists, this will save a LOT of extra HTML.
1kiwi1
Site Admin
Posts: 204
Joined: Mon Nov 19, 2018 9:26 pm

Re: Design Configuration - Specific HTML Elements of Default Design - Footer Layout

Post by 1kiwi1 »

Footer Layout

The footer of the page is entirely contained in the footer.tpl template file. In this page of the wiki we will go over the layout, and help with how to make changes, add/remove links, and things like that.

Overall Layout & Breakpoints

The entire footer is contained in the sub-template footer.tpl. It uses HTML5 tag <footer> surrounding the main contents of the footer like so:
<footer class="page">
...
</footer>
Note that just like with the <header> tag, the page can actually contain more than one <footer> tag. For this reason, the footer has the CSS class page so that it can be styled independently of any additional <footer> sections you may wish to add to your own custom design in addition to the main one.

The Footer is broken up into 4 main parts, the footer links, the "contact us" area, the copyright / user agreement text, and the area to put your custom JS used on every page. We'll go over each part of the footer in a dedicated section for each one on this page (further down).

The footer actually has 2 breakpoints, for a total of 3 different modes that you can see in the screenshots below.

Small View:
footer-overall-small.png
footer-overall-small.png (38.01 KiB) Viewed 5433 times
As you can see in the screenshot above, the footer links are displayed in a 2 column grid, and the other information is displayed in normal paragraph style.


First Breakpoint: 37.5em (600px)

footer-overall-37.5em.png
footer-overall-37.5em.png (29.09 KiB) Viewed 5433 times
In the first breakpoint, the main change is that the links switch to be inside the box with blue background, similar to how they look in the largest breakpoint but without the "about us" information on the right hand side. That's because there basically isn't enough room "yet" to show those links and the about info, so that happens at a secondary breakpoint:

Second Breakpoint: 54em (864px)
footer-overall-54em.png
footer-overall-54em.png (27.57 KiB) Viewed 5433 times
In this larger breakpoint, there is now room to fit the "about us" blurb on the right, along with the social links grouped as part of the "contact" info. You will notice that every part of the footer displayed no matter what size screen you are using, but the layout changes to respond to the screen size. This behavior lies at the heart of what RWD is all about, using the same content that has a layout that responds to the device's size and capabilities.

Adding / Removing Footer Links

The first part of the footer is the navigation links, highlighted in the screenshots below.

Small View:
footer-links-small.png
footer-links-small.png (51.54 KiB) Viewed 5433 times
As you can see in the screenshot above, the footer links are displayed in a 2 column grid, and the other information is displayed in normal paragraph style.

First Breakpoint: 37.5em (600px)
footer-links-37.5em.png
footer-links-37.5em.png (54.39 KiB) Viewed 5433 times
In the first breakpoint, the main change is that the links switch to be inside the box with blue background, similar to how they look in the largest breakpoint but without the "about us" information on the right hand side. That's because there basically isn't enough room "yet" to show those links and the about info, so that happens at a secondary breakpoint:

Second Breakpoint: 54em (864px)
footer-links-54em.png
footer-links-54em.png (30.62 KiB) Viewed 5433 times
The HTML markup is exactly the same for all 3 layouts, like so:
<nav class="footer clearfix">
<a href="index.php">Home</a>
<a href="index.php?a=1">Sell</a>
<a href="index.php?a=19">Search</a>

<a href="index.php?a=28&amp;b=135">Features</a>
<a href="index.php?a=28&amp;b=143">Pricing</a>
<a href="index.php?a=28&amp;b=141">Help</a>

<a href="index.php?a=28&amp;b=137">How It Works</a>
<a href="index.php?a=28&amp;b=144">Advertise With Us</a>
<a href="">Extra Link 1</a>

<a href="">Extra Link 2</a>
<a href="">Extra Link 3</a>
<a href="">Extra Link 4</a>
</nav>
If the HTML looks relatively simple, then we did our job here! Throughout the design, navigation links use a very simple markup, just an HTML5 tag <nav> with the <a> links inside it.

First, to remove the unused extra links: Remove the 4 lines, including the starting <a> tag and ending </a> tag. Specifically, remove these 4 lines, virtually every site will want to do this:

<a href="">Extra Link 1</a>

<a href="">Extra Link 2</a>
<a href="">Extra Link 3</a>
<a href="">Extra Link 4</a>


Those "extra links" are there just to illustrate that additional links can easily be added to your footer.

To add your own link, you would add a link similar to this:
<a href="LINK_URL">Link Name</a>
Add that on it's own line in the order you would like it to appear in. You would change LINK_URL to the link address you wish to link to, and change Link Name to the text to use for the link. Be sure to add that before the ending </nav> tag which signifies the end of the footer links.

Editing Pages linked to by the above links

Those links go to extra pages in the software. Each of those pages uses a specific extra page body template to display the content of those pages. To edit either of the templates below you would open your template set in the DESIGN > MANAGER admin tool. Then to edit the contents of the "features" page look to make changes in the following template:
/main_page/extra_pages/seller_buyer_features.tpl
To edit the contents of the "features" page look to make changes in the following template:
/main_page/extra_pages/pricing.tpl
And no the above page is NOT dynamically generated. The variety of ways that pricing can be setup within the software and the amount of time it would take to make the above page dynamic is prohibitive and most likely not the way you would want it to display. So we leave this one for you to edit.

To edit the contents of the "help" page look to make changes in the following template:
/main_page/extra_pages/help.tpl
To edit the contents of the "Advertise With Us" page look to make changes in the following template:
/main_page/extra_pages/advertise_with_us.tpl
Contact Us Section

Small View:

footer-contact-small.png
footer-contact-small.png (65.95 KiB) Viewed 5433 times
First Breakpoint: 37.5em (600px)
footer-contact-37.5em.png
footer-contact-37.5em.png (31.79 KiB) Viewed 5433 times
Second Breakpoint: 54em (864px)
footer-contact-54em.png
footer-contact-54em.png (31.25 KiB) Viewed 5433 times
The HTML markup is exactly the same for all 3 layouts, like so:
<div class="blurb">
<h3>Contact Us</h3>
<p>Need assistance? Have a question that isn't answered in our <a href="index.php?a=28&amp;b=141">help</a> sections?
You can contact support by visiting our <a href="index.php?a=28&amp;b=136">contact us</a> page.</p>
<nav class="social-contacts">
<a href="#" title="Facebook"><img src="{external file='images/icons/social/facebook.png'}" alt="Facebook" /></a>
<a href="#" title="Twitter"><img src="{external file='images/icons/social/twitter.png'}" alt="Twitter" /></a>
<a href="#" title="Google+"><img src="{external file='images/icons/social/google+.png'}" alt="Google+" /></a>
<a href="rss_listings.php" title="RSS Feed"><img src="{external file='images/icons/social/rss.png'}" alt="RSS Feed" /></a>
</nav>
</div>
The <h3> and <p> tags are specially styled when inside the footer section, as illustrated in the screenshots further up.

Social Links

We actually consider the social links as a sub-section of the Contact Us Section.

Small View:
footer-social-small.png
footer-social-small.png (48.89 KiB) Viewed 5433 times
First Breakpoint: 37.5em (600px)
footer-social-37.5em.png
footer-social-37.5em.png (39.71 KiB) Viewed 5432 times
Second Breakpoint: 54em (864px)
footer-social-54em.png
footer-social-54em.png (35.71 KiB) Viewed 5432 times
The HTML markup is exactly the same for all 3 layouts, like so:
<nav class="social-contacts">
<a href="#" title="Facebook"><img src="{external file='images/icons/social/facebook.png'}" alt="Facebook" /></a>
<a href="#" title="Twitter"><img src="{external file='images/icons/social/twitter.png'}" alt="Twitter" /></a>
<a href="#" title="Google+"><img src="{external file='images/icons/social/google+.png'}" alt="Google+" /></a>
<a href="rss_listings.php" title="RSS Feed"><img src="{external file='images/icons/social/rss.png'}" alt="RSS Feed" /></a>
</nav>
You can add your own links if you wish. You can even copy or move the social links to the header if you want the social icons to show at the top of each page. For each social site that you use, change the # to the link for your own account on that site. For instance:

Facebook:

Sample URL: http://www.facebook.com/Geocoremax

Sample HTML Snippet

Code: Select all

<a href="http://www.facebook.com/Geocoremax" title="Facebook"><img src="{external file='images/icons/social/facebook.png'}" alt="Facebook" /></a>
Twitter:

Sample URL: https://twitter.com/GeodesicSol/

Sample HTML Snippet2

Code: Select all

<a href="https://twitter.com/Geocoremax/" title="Twitter"><img src="{external file='images/icons/social/twitter.png'}" alt="Twitter" /></a>
We recognize that there are many social sites out there, and in the past the default design shipped with about 7 or 8 different icons showing in the header. In the new design (starting with 7.3), we made a decision to limit the number to just 4 social icons. If you are active across more social sites, you can easily add more icons for whatever social sites you use. At the same time, if you are not currently active on any of the default social sites, and don't want to start, just remove the line from the template! It's that easy.

Using +1 / Like / Share Snippets Provided by Social Sites

The default design links to the different social sites, and that's all, it does not use the snippets generated by each respective social website for a very good reason: Those load things from 3rd party sites, for instance the "like" button will load how many likes the page already has, and the image will be loaded from Facebook's own servers. This can greatly slow the page down, especially during peek times, your own website may become very slow and un-responsive if any of the social sites are currently loading slowly.

For those reasons, it is actually a very common practice to merely link to social sites without using the fancier HTML snippets that allow users to "like" your site or "share" your site. The exception to this in the software, is when using the sharing addon, it will use the social website based "sharing" tools. Even though it does slow down the page load, we feel that adding the ability to share a specific listing warrants the extra load time as it adds a very useful service. However we do not use this on "every page" of the website, since such tools would rarely be of use other than for a specific listing.

That said, you can add a social badge to the footer if you wish, just make sure you realize that this can slow down every page on your site, especially for mobile devices. You would copy/paste the applicable "badge HTML snippet" into your template where you would like the badge to appear.

Copyright / User Agreement

Small View:
footer-disclaimer-small.png
footer-disclaimer-small.png (52.79 KiB) Viewed 5432 times
First Breakpoint: 37.5em (600px)
footer-disclaimer-37.5em.png
footer-disclaimer-37.5em.png (48.68 KiB) Viewed 5432 times
Second Breakpoint: 54em (864px)
footer-disclaimer-54em.png
footer-disclaimer-54em.png (50.9 KiB) Viewed 5431 times
The HTML markup is exactly the same for all 3 layouts, like so:
<div class="disclaimer">
<h4>Copyright &copy; {$smarty.now|date_format:"%Y"} YOUR COMPANY NAME. All Rights Reserved.</h4>
<p>Use of this Web site constitutes acceptance of the <a href="index.php?a=28&amp;b=140">User Agreement</a> and <a href="index.php?a=28&amp;b=145">Privacy Policy</a>. Designated trademarks and brands are the property of their respective owners.</p>
</div>
Be sure to change YOUR COMPANY NAME in the template to your own company or website name. You can also adjust the text as needed, or even remove the entire section if you feel it is not needed on your site.

Remove Powered By Geocoremax
footer-powered-54em.png
footer-powered-54em.png (34.05 KiB) Viewed 5431 times
The Powered By section is actually not part of the footer. This is generated by the software itself. You can remove it (or turn it on if it was previously turned off) in the admin at:
Site Setup > General Settings > Show "Powered By"
To turn it off, set the setting to Remove Branding.
1kiwi1
Site Admin
Posts: 204
Joined: Mon Nov 19, 2018 9:26 pm

Re: Design Configuration - Specific HTML Elements of Default Design - Adding JavaScript to the Design

Post by 1kiwi1 »

Adding JavaScript to the Design

If you find you need to add your own JavaScript into the software you will need to insert it into the design a specific way so that it does not get parsed by the Smarty pre-compiler. It is simple to protect your js from the parser. Simply surround your js code with some specific tags. Many clients want to insert Google Analytics code into the software so we'll use that as an example:

Code: Select all

{literal}
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("your_tracker_number_here");
pageTracker._trackPageview();
} catch(err) {} }</script>
{/literal}
Note that if you place JavaScript into a Smarty template you only need to surround it with the {literal}..{/literal} so the Smarty precompiler does not mangle or try to parse that code.

If you are placing Google Analytics code or any other "site stats" code we would suggest adding it in the footer.tpl of the default design and placing it before the closing </body> tag.

NOTE If your js code requires the use of jQuery you DO NOT need to include that within your html head. Our software already includes it and if you include it within your code it will only break both instances of jQuery included. When adding any JavaScript just be wary of the js our software already uses so you can be aware of any conflicts if they arise.
1kiwi1
Site Admin
Posts: 204
Joined: Mon Nov 19, 2018 9:26 pm

Re: Design Configuration - Specific HTML Elements of Default Design - Category Display Mobile Vs Desktop

Post by 1kiwi1 »

Category Display Mobile Vs Desktop

In order for the the default design to look good in both mobile view and desktop view on the default front page template we've created two different category displays. The descriptions here only affect the following templates in the default template set:
/main_page/front_page.tpl
/main_page/alternate_front_pages/showcase.tpl
Within desktop view the category navigation you see is provided by the following tag:
{body_html}
And within the desktop view the category navigation is provided by the following custom smarty tag:
{category_list}
The "category list" is a single column display of the category navigation and appears in the fusion and marquee templates sets also. The css within the default design hides the "body html" generated category navigation when viewing on mobile devices. The "category list" category navigation is hidden while viewing the design on a desktop.

There are no specific admin tools to edit the category navigation generated by the {category_list} tag. To make changes to it's display you would need to edit the following file directly:
/main_page/helpers/categories.tpl
We have created a tutorial on getting category counts to display within the "category list" display, in this support wiki.

To affect the category navigation generated for the body html tag within the desktop view look to the category navigation you find here in your admin tool:
SITE SETUP > BROWSING SETTINGS
1kiwi1
Site Admin
Posts: 204
Joined: Mon Nov 19, 2018 9:26 pm

Re: Design Configuration - Specific HTML Elements of Default Design - Change Site Off Page

Post by 1kiwi1 »

Change Site Off Page

If the site is turned off using this admin tool setting:
SITE SETUP > GENERAL SETTINGS > Site On/Off Switch
And someone visits your site they are redirected to the following html page within your Geo file set:
site_off.htm
That file is within the base directory of your Geo installation. The site_off.htm file is in the same directory as the config.php file for the software. If you wish to change the look of the site off page you would need to download and edit the above file. You cannot edit this file through the software's admin tool. That file is solely composed of html/css and you can make any changes you wish to it without affecting the base software.

Things to note about this feature:
  • If you go to your site and are redirected to the site off page and refresh that page to see if the site is "back up" you are only refreshing your view of the site_off.htm page. To see if why you were redirected has been resolved you must "go back" to the index.php file for the software.
  • You can allow yourself (admin) access to the site while others see the "site off page" by using the allowed ips feature explained in this wiki
1kiwi1
Site Admin
Posts: 204
Joined: Mon Nov 19, 2018 9:26 pm

Re: Design Configuration - Specific HTML Elements of Default Design - Changes to Extra Pages

Post by 1kiwi1 »

Changes to Extra Pages

The extra pages are pages built into the system to allow you to place your own content undisturbed yet still in the framework of the software. We do not place dynamic content on extra pages by default. The "body html" content on these pages are simply templates you set within the admin tool. These pages are designed to allow you to display supporting materials, additional advertising or general tutorial pages on your site yet still be within the templates and framework of the Geocoremax software. In other words you can put your content into a page of the software and still have the same look of the software without the hassle of creating an external html page.

Below is a list of the default extra pages we include in the default installation and which templates you can change to affect that page. But note you can create your own extra page body templates and assign them to any page you want. This page of the support explains the extra page feature configuration in more detail.

The following are the extra page templates we include by default within the software and the respective path to those templates in your custom template set. To edit each you would go to the DESIGN > MANGER admin tool and navigate to the templates mentioned below to edit the content in those pages.
  • About us page - /main_page/extra_pages/about_us.tpl
  • Pricing page - /main_page/extra_pages/pricing.tpl
  • Seller and Buyer Features page - /main_page/extra_pages/seller_buyer_features.tpl
  • Help page - /main_page/extra_pages/help.tpl
  • Advertise With Us page - /main_page/extra_pages/advertise_with_us.tpl
  • Terms and Conditions page - /main_page/extra_pages/terms_and_conditions.tpl
  • Privacy Policy page - /main_page/extra_pages/privacy_policy.tpl
  • How It Works page - /main_page/extra_pages/how_it_works.tpl
  • Contact Us page - /main_page/extra_pages/contact_us.tpl

    The software comes with 20 extra pages within the system. You can use them for any purpose you need, though we've just given you a head start with the above page suggestions linked within the default design.

    Each extra page by default uses the basic_page.tpl template as the page template with the above body templates assigned separately within each extra page admin tool. To illustrate:
    extra_page_templates2.png
    extra_page_templates2.png (113.92 KiB) Viewed 3483 times
    extra_page_templates.png
    extra_page_templates.png (150.92 KiB) Viewed 3483 times
    Where do you manage this feature in the admin tool?

    You can edit any of the templates we provide using the following admin tool pointed to any of the templates above but we suggest you keep all extra page templates in the /main_page/extra_pages/ directory of your custom template set for organizational purposes:
    DESIGN > MANAGER
    The assignment of a extra page body template can be reached in two different ways. Through the page template attachment tool here:
    DESIGN > PAGE ATTACHMENTS > EXTRA PAGE # > [EDIT]
    As shown in the following screenshot:
    extra_page_edit_folder.png
    extra_page_edit_folder.png (26.02 KiB) Viewed 3476 times
    Once you have clicked on the extra_pages/ directory you would see:
    extra_page_edit_default.png
    extra_page_edit_default.png (50.91 KiB) Viewed 3476 times
    Or through the pages management admin tool here:
    PAGES MANAGEMENT > EXTRA PAGES > [EDIT] (next to the page you want to set/edit attachment)
    Within the pages you reach above you can assign the page template and the extra page body template used on those pages.

    Linking to Extra Pages

    To get to any of these extra pages in your default design you must link to that page in your design using the url set for that extra page. You can always find the link to an extra page within that extra pages admin tool page here in the admin tool:
    PAGES MANAGEMENT > EXTRA PAGES > [EDIT] (next to the page you want to set/edit attachment)


    Once in that page you'll see a "page url" setting. That contains the url to that extra page. All extra page links by default look something like:
    Where the "XXX" is the page number in the system for that page.

    If you decide to use the SEO addon to rewrite your urls the extra page urls are not automatically rewritten for you. We do not know what purpose you are using your extra pages for so cannot create those rules before hand. But you can still rewrite these urls to a more SEO friendly format by manually creating a rewrite rule for it. Please consult the SEO Addon in this wiki for further information.
1kiwi1
Site Admin
Posts: 204
Joined: Mon Nov 19, 2018 9:26 pm

Re: Design Configuration - Specific HTML Elements of Default Design - Changing The HTML Title

Post by 1kiwi1 »

Changing The HTML Title

That HTML Page Title is what typically shows up in your browser's window within a "Tab" or "Title Bar".

The software offers several options for editing the Page Title within your site. It just depends upon how in depth you want to get with it. Within the "title module" you are able to set page specific titles for all pages in the system. Then, within the software's category admin menu, you can even set category specific titles for each category in the system. Furthermore, the title on each listing details page even gets populated with the title of the listing itself. With all the individual controls for page title you should have little if any "title duplicates" across your site.

For SEO purposes it is important to set an html title that accurately reflects the content within that page. It is also important that the title be unique, though more for SEO purposes that informational. The html title module has been designed to allow for more focused html titles that are easily manageable within the Geo admin tool. We'll describe here how to manage this feature in the admin tool.

Setting Titles For Individual Pages

To set the title for individual pages within the system look to the following admin tool:
PAGE MODULES > MISC > TITLE MODULE
Note, we have used an older version of Geodesic's graphics to accompany illustrations, however the same methods apply.

The above opens up the following admin tool:
title_management1.png
title_management1.png (35.75 KiB) Viewed 3475 times
title_management.png
title_management.png (27.36 KiB) Viewed 3475 times
Within the screenshots you'll see:
  • 1. the admin note allows you to save a note about the module if you have any. It could be a note about how you are using it or something you need to do. This note does not appear anywhere else.
  • 2. the template tag is the placement tag you would use to place this module's functionality within the design where you want it to appear. This tag is placed within the default templates where the html title will appear. If you create your own template design and wish to use this feature you would place this module tag to place this modules output
  • 3. this is the title for non-listing pages that do not have their own title set for them within this modules admin tool.
  • 4. This is the default front page title value. If this module appears within the page template used on the front page this is the value it will place.
  • 5. You can choose to display the current language browsed at the end of the title if this checkbox is checked. The "language value shown" will be that shown for each language within the languages admin tool and coincidentally those same language value option appear in the language specific text management just below
  • 6. You will see a choice here for each language you currently have within your system. You setup those languages in the language management tool. This module has a specific set of text for each language available in the system. You can control the values of this module on a page by page, category by category and language by language basis. You would edit the text options on a page by page basis within the pages linked to here.
Once you click one of the language links available in the above admin tool page you'll be taken to a page that looks like this:
title_management2.png
title_management2.png (72.4 KiB) Viewed 3475 times
title_management_new.png
title_management_new.png (44.84 KiB) Viewed 3475 times
Within the screenshots you'll see:
  • 1. the current language for this module you are editing
  • 2. the current module whose text you are editing
  • 3. this page should contain all text available for use within the title module for the current language edited. This value is the title of the text or in the instance of this module what page it will appear in where this title module is placed. This should label the texts use that displays to it's right
  • 4. this is the current text for the current language. What you see here appears in the client side.
  • 5. click this button to edit the corresponding text to the left.
As you can see in some of the text above there will be other content placed with reference to the text you edit here. For many "listing specific" pages you'll see the listings title included. For other "user specific" pages you'll see that users username within the title on the client side.

Setting Category Specific Page Titles

Each category has it's own title and also it's own controls for what will appear in the title module when browsing that category. To set those category specific values look to make changes in the category admin tool you'll find here:
CATEGORIES > CATEGORIES > [EDIT] (next to a specific category)
This screenshot shows what to do:
title_management3.png
title_management3.png (77.91 KiB) Viewed 3474 times
title_management_categories.png
title_management_categories.png (125.99 KiB) Viewed 3474 times
Once you click the "edit" button next to the category you wish to affect you'll see a page like so:
title_management4.png
title_management4.png (74.54 KiB) Viewed 3473 times
title_management_cats_1.png
title_management_cats_1.png (48.37 KiB) Viewed 3473 times
Within that screenshot you should see the place to edit the title that will appear in the title module for this category. If no value is set for a specific category that category's name will be used in the title.

Display Region Selection in Title Module

If you have the geographic navigation addon enabled you can have the software automatically place the current region browsed within the title module if you like. You only need to check the following checkbox:

[quoteADDONS > GEOGRAPHIC NAVIGATION > SETTINGS > Show listing's region in Title Module][/quote]

Of course both the geographic navigation addon needs to be enabled and the title module in use for this to happen.
Post Reply