If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Do I have to copy the whole template? And how much do I rename?

Do I have to copy the whole template? And how much do I rename?

Locked

Started by littledog on 30 Sep 2008, 7:07 PM · Views: 3,194

Results 1 to 18 of 18
This thread is locked. New replies are disabled.
30 Sep 2008, 7:07 PM
#1
littledog avatar

littledog

New Zenner

Join Date:
Feb 2008
Posts:
12
Plugin Contributions:
0

Do I have to copy the whole template? And how much do I rename?

I want to customize some of the “Define Pages” and I also want to change the name in the list tools/define pages. Using “Page 4” as an example, my question is, do I have to change every instance in the php docs where I find page 4? Here are the places I THINK that I should replace it:

includes/languages/english/html_includes/define_page
admin/ includes/languages/english/define_pages_editor
admin/ includes/languages/english.php
includes/language/english.php
includes/filenames.php
includes/modules/pages/page##/header_php.php
includes/modules/sideboxs/more_informatim
includes/languages/english/page_##
includes/templates/template_default/templates/tpl_site_map_default.php
page 4 (folder)
includes/templates/template_default/templates/templates/tpl_site_map_default.php

I am also having a problem using the Template Override system. I think the problem was that I did not copy the contents of “classic” to “custom.” Just to be clear on this, you HAVE to copy the contents of “classis” to “custom” to make it work, right?

30 Sep 2008, 8:17 PM
#2
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Do I have to copy the whole template? And how much do I rename?

To answer your first question:

Create the text you want in includes/languages/english/html_includes/YOUR_TEMPLATE/define_page_4.php.

In includes/languages/YOUR_TEMPLATE/english.php, change the text I've highlighted in red to what you want the title of the page to be.

  define('BOX_INFORMATION_PAGE_4', 'Page 4');

To answer your template question.
You only have to copy what you're going to change. Anywhere you see a /classic/ folder, you can create a folder for your custom template. You can copy the necessary files from either the /classic/ folder, the /template_default/ folder or the parent folder.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

1 Oct 2008, 1:15 AM
#3
littledog avatar

littledog

New Zenner

Join Date:
Feb 2008
Posts:
12
Plugin Contributions:
0

Re: Do I have to copy the whole template? And how much do I rename?

Thanks afo but the title of my post is messed up so that might have been confusing, I don’t know how that title got there, I thought I titled it “Do I have to change every instance?”

My main question is, do I have to change every instance of "Page 4" or "page_4" in every doc that I find it? I want to change the title in the side box and on the page itself. I also would like to change it in the drop down box of tools/Define Pages editor. I also want to make sure that I do not mess something up be not changing it somewhere where is should be changed.

1 Oct 2008, 2:16 AM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,752
Plugin Contributions:
0

Re: Do I have to copy the whole template? And how much do I rename?

My main question is, do I have to change every instance of "Page 4" or "page_4" in every doc that I find it?

Read the post from AFO again.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

1 Oct 2008, 3:26 AM
#5
littledog avatar

littledog

New Zenner

Join Date:
Feb 2008
Posts:
12
Plugin Contributions:
0

Re: Do I have to copy the whole template? And how much do I rename?

I did read it and afo answered the second part of the question, not about if I have to change evert instance where page 4 is.

1 Oct 2008, 4:08 AM
#6
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Do I have to copy the whole template? And how much do I rename?

littledog:

I did read it and afo answered the second part of the question, not about if I have to change evert instance where page 4 is.

No, you only need to change what I said in my original post.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

1 Oct 2008, 4:28 AM
#7
littledog avatar

littledog

New Zenner

Join Date:
Feb 2008
Posts:
12
Plugin Contributions:
0

Re: Do I have to copy the whole template? And how much do I rename?

Sorry, I didn't think that you answered the question. I guess I was looking for a yes or no answer. I am trying to get a firm grasp of this and I might be over thinking it because it seemed to me that all of the places that the page is referenced it would have to be changed. Your way is a lot easier. Thanks

1 Oct 2008, 4:37 AM
#8
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Do I have to copy the whole template? And how much do I rename?

I most definitely answered your question. No, you do not have to change every reference. You only have to change the references I listed. I used exactly that method to create the biography and resume pages on my nephew's site listed in my sig.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

1 Oct 2008, 11:50 AM
#9
steve_1 avatar

steve_1

Zen Follower

Join Date:
Sep 2008
Location:
London UK
Posts:
100
Plugin Contributions:
0

Re: Do I have to copy the whole template? And how much do I rename?

afo:

I most definitely answered your question. No, you do not have to change every reference. You only have to change the references I listed. I used exactly that method to create the biography and resume pages on my nephew's site listed in my sig.
problem doing that is ... when you hover over the links it still shows page_2 and not Biography in status bar and also in browser address bar when clicked

1 Oct 2008, 12:46 PM
#10
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Do I have to copy the whole template? And how much do I rename?

I will have to look at that. I hadn't noticed it.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

1 Oct 2008, 12:59 PM
#11
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Do I have to copy the whole template? And how much do I rename?

After thinking about this, I realized it would be VERY difficult to change that (the url) because the name of the file is still "page_2". If you change that in the files where the values are stored, you'll have to change the name of file itself.

Take a look at the About Us add on. You can rename/edit the files to create your own pages, but they won't be available from the define pages editor in the admin.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

2 Oct 2008, 9:05 AM
#12
steve_1 avatar

steve_1

Zen Follower

Join Date:
Sep 2008
Location:
London UK
Posts:
100
Plugin Contributions:
0

Re: Do I have to copy the whole template? And how much do I rename?

i understand it is a little more difficult but there is a generator to do it for you http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_47&products_id=804 and you get the page you created in the define pages area of admin

I found quite easy in the end when you try it

just my opinion but looks better having a page name that better fits it than page_2

i would show you my site so you can see but am still working on it on my home pc so its notlive yet

26 Oct 2008, 12:53 AM
#13
littledog avatar

littledog

New Zenner

Join Date:
Feb 2008
Posts:
12
Plugin Contributions:
0

Re: Do I have to copy the whole template? And how much do I rename?

I tried a changing every instance of a define page name that I found and it still did not work the way I was hoping. I posted about it here.
http://www.zen-cart.com/forum/showthread.php?p=630534#post630534

The main reason I want to do this is so that in tools/Define page editor I want it to show up as what I renamed it but no matter what I do it doesn't show up in configure/define page status. I am probably wasting my time but I get a little obsessive about things and if it seems like it should work I want it to.

26 Oct 2008, 1:24 AM
#14
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Do I have to copy the whole template? And how much do I rename?

There is nothing wrong with the idea of what you want to do, the problem is in the implementation.

You should be creating 'new' Define pages, not trying to alter current ones.
It "will" get very confusing as you must create new files plus insert the correct code.

There are 7 files required as follows.

EXAMPLE - the new Define Pages word(s) to be used
YOUR_TEMPLATE - your custom template

Files to create:

  1. includes/extra_datafiles/EXAMPLE_filenames.php
  2. includes/languages/english/extra_definitions/YOUR_TEMPLATE/EXAMPLE.php
  3. includes/languages/english/html_includes/define_EXAMPLE.php
  4. includes/languages/english/html_includes/YOUR_TEMPLATE/define_EXAMPLE.php
  5. includes/languages/english/YOUR_TEMPLATE/EXAMPLE.php
  6. includes/modules/pages/EXAMPLE/header_php.php
  7. includes/templates/YOUR_TEMPLATE/templates/tpl_EXAMPLE_default.php

After copying these files to your zencart installation directory, you can link to this page using the following link:
http://yourdomain.com/index.php?main_page=EXAMPLE

You are better off using the Define Pages Editor mentioned previously. It will create the necessary files and code for you and you just upload them.

Time involved:

Define Pages Editor - 5 minutes to create and upload
On Your Own - anywhere from 1 - 10 hrs. depending upon your level of self-punishment. :wink:

The learning is in the doing.

Potent Products

26 Oct 2008, 3:56 AM
#15
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Do I have to copy the whole template? And how much do I rename?

ez-pages rock

no extra adding of anything,
just create it in the admin

Zen cart PCI compliant Hosting

26 Oct 2008, 4:25 AM
#16
littledog avatar

littledog

New Zenner

Join Date:
Feb 2008
Posts:
12
Plugin Contributions:
0

Re: Do I have to copy the whole template? And how much do I rename?

You are not kidding about the problems of implementation, I run a Mac so I color coded the docs and had alias’ going from here to there and docs and tables to keep track…LOL. Maybe I am in to self-punishment. I did learn a lot from it at least.

You actually answered a question I meant to ask, can I just make my own. I will try what you suggested and hopefully the new ones will show up in tools/define page editor and configuration/define page status. Thanks.

26 Oct 2008, 5:14 AM
#17
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Do I have to copy the whole template? And how much do I rename?

Listen to Merlin...save yourself lot of time and trouble..
then activate ez pages sidebox...
:wink:

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

26 Oct 2008, 5:29 AM
#18
littledog avatar

littledog

New Zenner

Join Date:
Feb 2008
Posts:
12
Plugin Contributions:
0

Re: Do I have to copy the whole template? And how much do I rename?

Yep, yep, yep, it was a whole lot easier than what I was trying to do. At least in the process of reinventing the wheel I learned a lot. One more OCD question, how is it that the About Us page shows up under information but it is not in Configurations/Define Page Status, it seems like it would have to be there to be turned on and off.

BTW, I have been doing a lot of experimenting on a "play" store that I set up. My real store has been open for a year but a lot of times when I tried things I got a "white screen of death" so I was afraid to try too much. Now that I have what I call storex it doesn't matter if I mess things up, it really has freed me to experiment a lot more. I am really starting to get Zenned myself.

I have 3 user names here, is it possible to get them combined and just keep the one I go by now, JulieO?