Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Define Text doesn't appear on my template, can I add it back in?

Define Text doesn't appear on my template, can I add it back in?

Locked

Views: 1,827

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
23 Dec 2009, 11:44 PM
#1
simondale123 avatar

simondale123

New Zenner

Join Date:
Jun 2008
Posts:
60
Plugin Contributions:
0

Define Text doesn't appear on my template, can I add it back in?

Hi,

The template that I use (you can see my site here: https://www.firstpersonview.co.uk) does not show the define text on the home page if I set it (I've tried going back to the original green template and it does work for that).

This means I can't have any opening descriptive text about my business.

I've tried following a trail from index.php > tpl_main_page.php > main_template_vars.php > header_php.php thinking I would eventually get to where it has been disabled in my template and add it back in. I've failed miserably though unfortunately.

Could anyone please point me in the right direction as to where the normal template includes the define_page text and where it should be in a template to work properly?

Many thanks indeed for your help in advance.

Sincerely

Simon

24 Dec 2009, 12:00 AM
#2
pdxdoug avatar

pdxdoug

Zen Follower

Join Date:
Jan 2008
Location:
Portland, Oregon USA
Posts:
356
Plugin Contributions:
0

Re: Define Text doesn't appear on my template, can I add it back in?

Is it enabled?

Admin/Configuration/Define Page Status

24 Dec 2009, 5:14 AM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Define Text doesn't appear on my template, can I add it back in?

If that setting is on, check the files:

/includes/templates/template_default/templates/tpl_index_categories.php

Line #33 : <?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>

/includes/templates/template_default/templates/tpl_index_default.php

Line #32 : <?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>

Does your templates and overrides have that code in them?

If not, look at the original files and find the missing IF statements ... they should look similar to:

<?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>
<?php
/**
 * get the Define Main Page Text
 */
?>
<div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>
<?php } ?>
24 Dec 2009, 11:02 PM
#4
simondale123 avatar

simondale123

New Zenner

Join Date:
Jun 2008
Posts:
60
Plugin Contributions:
0

Re: Define Text doesn't appear on my template, can I add it back in?

Thanks so much for taking the time to reply and so thoroughly too!

If I am right in understanding what an override directory is (the identical path but with my template name in there IE /includes/templates/template046/templates/tpl_index_categories.php in my case) then weirdly those lines of code are there in both files, but I don't get the feature text showing up.

Have I misunderstood where I should be looking for the override directory? Is there anything else I can check?

Thanks again for your help - I really appreciate it

Happy Christmas!

Simon

24 Dec 2009, 11:15 PM
#5
website_rob avatar

website_rob

Inactive

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

Re: Define Text doesn't appear on my template, can I add it back in?

Sounds like you have misunderstood how the override system in general, works with Custom Templates. Use the FAQ link at top of this page and search using "overrides" to get more information.

To answer your immediate question, you need to do the following.

Copy this dir:
includes/languages/english/html_includes/classic

To this dir - you will need to manually create this dir.
includes/languages/english/html_includes/template046

The file you need to edit is:
includes/languages/english/html_includes/template046/define_main_page.php

Note: probably easiest to edit the 'define' page on your personal computer then upload it. It will replace the previous one and you should see your changes.

24 Dec 2009, 11:56 PM
#6
simondale123 avatar

simondale123

New Zenner

Join Date:
Jun 2008
Posts:
60
Plugin Contributions:
0

Re: Define Text doesn't appear on my template, can I add it back in?

Hi Rob,

Thanks a lot for your reply.

I did intitially do as you said and I already have a folder with the name that you suggested with a define_main_page.html inside it (and a define_testimonials_add.php inside). However I followed your instructions and renamed the existing folder, replacing it with a copy of includes/languages/english/html_includes/classic.

I now have exactly the same result. No define text appears on the screen with the theme046 template set.

It does work with the Green Classic template enabled so somehow when I activate the Theme046 template it disables feature text. Weird.

Thanks a lot for your help

Simon

25 Dec 2009, 12:23 AM
#7
simondale123 avatar

simondale123

New Zenner

Join Date:
Jun 2008
Posts:
60
Plugin Contributions:
0

Re: Define Text doesn't appear on my template, can I add it back in?

I've attached 3 screenshots to show what I mean. Its there with the Green template, but nowhere to be found with theme046.

I figured the template simply commented out, or was missing, the lines to include the feature text but since the code is there I'm stumped.

Any help much appreciated!

All the best

Simon

25 Dec 2009, 12:54 AM
#8
simondale123 avatar

simondale123

New Zenner

Join Date:
Jun 2008
Posts:
60
Plugin Contributions:
0

Re: Define Text doesn't appear on my template, can I add it back in?

I've might have made some progress but I'm still confused...

I edited the file includes/templates/theme046/templates/tpl_index_default.php as follows (basically to force it to include the feature text whether the if statement is true or not):

<div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>

<?php if (DEFINE_MAIN_PAGE_STATUS >= '1' and DEFINE_MAIN_PAGE_STATUS <= '2'){ ?> <?php /** * get the Define Main Page Text */ /* ?> <div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div> <?php */ } ?>

It worked and the feature text appeared. The page it reads in is the one from includes/languages/english/html_includes/theme046/define_main_page.php

I guess DEFINE_MAIN_PAGE_STATUS is the switch set in the admin area which is definitely on because feature text appears on the Green template. But why does the code seem to think that feature text is turned off in the theme046 template? I can't explain that!

Any suggestions much appreciated.

All the best

Simon

25 Dec 2009, 1:01 AM
#9
simondale123 avatar

simondale123

New Zenner

Join Date:
Jun 2008
Posts:
60
Plugin Contributions:
0

Re: Define Text doesn't appear on my template, can I add it back in?

I added the following line and thought it was even more weird because the result was 1:

<?php echo DEFINE_MAIN_PAGE_STATUS ?>

Then I realised that the code in my page is looking for '1' (a string) not 1 (a number) when compared to Ajeh's code earlier.

I removed the 's and everything is working fine now.

Thanks everyone you've all been a great help and I really appreciate it.

All the best

Simon

25 Dec 2009, 5:08 AM
#10
website_rob avatar

website_rob

Inactive

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

Re: Define Text doesn't appear on my template, can I add it back in?

Website Rob:

The file you need to edit is:
includes/languages/english/html_includes/template046/define_main_page.php

Not sure why you are doing all the other stuff?

25 Dec 2009, 8:25 AM
#11
simondale123 avatar

simondale123

New Zenner

Join Date:
Jun 2008
Posts:
60
Plugin Contributions:
0

Re: Define Text doesn't appear on my template, can I add it back in?

Website Rob:

Not sure why you are doing all the other stuff?
Err...didn't you see my above posts? Changing that file had zero effect.

I discovered that this was because my code was looking for '1', not 1. I changed that to match what Ajeh had posted and everything started to work as expected.

Thanks again for you help

Simon
Posted via Mobile Device