Forums / Templates, Stylesheets, Page Layout / adding a link to my site's footer

adding a link to my site's footer

Locked

Started by mzimmers on 16 Feb 2010, 8:53 PM · Views: 1,772

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
16 Feb 2010, 8:53 PM
#1
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

adding a link to my site's footer

Hi, all –

I'm back to looking at ZC after a long hiatus. I feel like I'm starting from scratch.

My specific question is, how do I modify the footer of my site? A header.php file exists, but no equivalent for the footer.

A more general question is, has anyone put together a real tutorial yet? The FAQs are full of information, but I'm looking for something that would flow a bit more naturally.

Thanks for any help.

16 Feb 2010, 10:08 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: adding a link to my site's footer

From /includes/templates/template_default/common/tpl_footer.php:```php
require(DIR_WS_MODULES . zen_get_module_directory('footer.php'));

Therefore, you would modify /includes/modules/footer.php amd save it as /includes/modules/your_template/footer.php.

There are header.php files in a number of places; are you sure you are looking at the right one?


There is no top-to-bottom comprehensive design tutorial yet, nor is there likely to be unless someone publishes a large book. There is a program flow diagram in Free Addons; otherwise, the forum generally remains the best source of info for a particular area.
16 Feb 2010, 10:25 PM
#3
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: adding a link to my site's footer

Thanks, Glenn. May I safely assume that if the /includes/modules/your_template/ subdirectory doesn't exist, I can manually create it? Or, is that a sign that I've done something wrong earlier?

On another subject: do you happen to know if there's something wrong with the instant email notification feature? I had that set on this thread, but got nothing.

16 Feb 2010, 10:36 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: adding a link to my site's footer

/your_template/ should be changed to whatever your custom template foldername is, and created if it doesn't yet exist. Any place you see a /classic/ folder in the Zen Cart structure, you can create your own custom folder for modified files at that level.

I don't know about the forum notification; if I had that set my inbox would be overwhelmed:)

16 Feb 2010, 10:41 PM
#5
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: adding a link to my site's footer

Having looked at the original tpl_footer.php file, I now wonder whether it's necessary for me to modify it after all. All I wanted to do was to add a link to the admin CP. My memory is really rusty on this, but...is this somehow done via the EZPAGES stuff?

Thanks.

17 Feb 2010, 7:44 AM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: adding a link to my site's footer

Yes, you can add an external link leading wherever you want using the ez-page system. Enable that link for the footer, give it a name and that name will show as a link in the footer.

17 Feb 2010, 3:49 PM
#8
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: adding a link to my site's footer

gjh42:

Yes, you can add an external link leading wherever you want using the ez-page system. Enable that link for the footer, give it a name and that name will show as a link in the footer.
So, is this done through the Tools --> EZ Pages configuration panel? I can see where I can add an entire page, but that seems unnecessary. How do I "enable that link?"

Thanks.

17 Feb 2010, 7:17 PM
#9
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: adding a link to my site's footer

In case I didn't make my question clear...what I am trying to find out is whether I need to create a new page in order to add a link. That would seem to be an unnecessary intermediate step, but I don't see a way to simply add a link to the footer, other than hard-coding the footer file (which seems quite out of step with my understanding of the ZC philosophy).

The FAQ example only shows doing this with a new page. Can someone tell me whether there's a more straightforward method for this?

Thanks. I am determined to get the hang of ZC this time around.

17 Feb 2010, 7:51 PM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: adding a link to my site's footer

If you create an ez-page with only a name, the display enabled for the footer, and a URL in the correct box at the bottom, you will get a straight link to your destination in the footer.

This "ez-page" exists only as a means of getting that link to function.

17 Feb 2010, 7:57 PM
#11
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: adding a link to my site's footer

Thanks, Glenn. That's exactly what I wanted to know. (Now, let's see if I can go make it work!)

Would it be safe to generalize from this example and say that any additions to a ZC site entail making an ez-page?

mz

17 Feb 2010, 8:17 PM
#12
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: adding a link to my site's footer

Another minor question: is there a way to make this an internal link, or should it be external?

18 Feb 2010, 7:42 AM
#13
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: adding a link to my site's footer

An internal link, pretty much by definition, is one to a location inside the Zen Cart folder structure. It can be accurately specified by index.php?main_page=whatever&whatever=whatever...

Anything else is an external link.

I wouldn't necessarily say that "any" addition to a Zen Cart site would be an ez-page, but that is often the best way to go. In some cases, a new define page may be needed instead, or some other methods.

18 Feb 2010, 10:10 PM
#14
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: adding a link to my site's footer

OK, so I guess the admin page is most accurately described as an external link. I added it as such, and it worked like a champ. Thanks for the help, Glenn.