Forums / General Questions / Display a page without the categories

Display a page without the categories

Views: 1,114

Results 1 to 14 of 14
26 Apr 2011, 3:45 PM
#1
davisz avatar

davisz

Zen Follower

Join Date:
Jan 2011
Posts:
141
Plugin Contributions:
0

Display a page without the categories

Hello,

I've done some searching and I cannot find a similar topic to this. I want to create a page that will list some choices for the customer to examine before they make their final purchase. I do not want this page to be a new zen_cart page completely, just a page that shows the content I want and not the categories. (If unavoidable, it would be ok if the header was gone too.)

Has anyone attempted or accomplished this?

Thanks for the tips.

26 Apr 2011, 5:51 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Display a page without the categories

  1. Create an EZPage containing your desired content (ie: the list of links, or whatever it is)

  2. Create a stylesheet called pageXX.css (where XX is the EZPage ID number - you can see the ID number in a browser address bar when the page is showing on-screen - index.php?main_page=page&id=21).

  3. Write up appropriate CSS declarations that will HIDE or render NON-VISIBLE, the elements you don't want to show....

... for example, to HIDE the categories box, you would use the following declaration:

#categories {display:none;}
```.

4. FTP the stylesheet into the css folder of the template you are using. When that EZPage loads, the stylesheet will take effect and administer whatever declarations you have used in it.

20 years a Zencart User

27 Apr 2011, 1:30 PM
#3
davisz avatar

davisz

Zen Follower

Join Date:
Jan 2011
Posts:
141
Plugin Contributions:
0

Re: Display a page without the categories

Do I need to tell the main page to reference the new .css I made? Nothing was effected, I think I followed your steps correctly.

More specifically (Ignore all of the unloaded images.) Here is the link http://testmulberry.com/?main_page=page&id=16

27 Apr 2011, 1:39 PM
#4
davisz avatar

davisz

Zen Follower

Join Date:
Jan 2011
Posts:
141
Plugin Contributions:
0

Re: Display a page without the categories

I know their is a lot going on. Customer wants this exact page to be displayed. There are a few embedded css elements, I just don't really know which ones are safe to be removed without messing up the alignment of everything. It's supposed to look like this when I get all of the images loaded. http://www.mulberryfundraisers.info/Macbeth_Patterns.html

27 Apr 2011, 1:42 PM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: Display a page without the categories

No, if you have named and saved the new stylesheet correctly, it will automatically be used.

Your page head is not calling for page16.css, so you must not have the file correct yet.

27 Apr 2011, 1:48 PM
#6
davisz avatar

davisz

Zen Follower

Join Date:
Jan 2011
Posts:
141
Plugin Contributions:
0

Re: Display a page without the categories

I created and saved the file as page16.css It is in my templates css folder. The only content of the file is

#categories {display:none;}

Is more needed? Thanks for helping.

27 Apr 2011, 2:09 PM
#7
davisz avatar

davisz

Zen Follower

Join Date:
Jan 2011
Posts:
141
Plugin Contributions:
0

Re: Display a page without the categories

I even tried with a page17.css and created a new EZ page (#17) with no content other than the words Test. With the same content as the other .css and the same thing is happening, the categories are not disappearing.

27 Apr 2011, 9:38 PM
#8
gjh42 avatar

gjh42

Black Belt

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

Re: Display a page without the categories

Do you currently have a file at /includes/templates/lite_red/css/page16.css?

Does your template have an /includes/templates/lite_red/common/html_header.php file? If so, what is the date on it? The page##.css capability was only added in v1.3.9something.

28 Apr 2011, 12:12 PM
#9
davisz avatar

davisz

Zen Follower

Join Date:
Jan 2011
Posts:
141
Plugin Contributions:
0

Re: Display a page without the categories

Do you currently have a file at /includes/templates/lite_red/css/page16.css?

Yes.

Does your template have an /includes/templates/lite_red/common/html_header.php file? If so, what is the date on it? The page##.css capability was only added in v1.3.9something.

The date it was created was 1/25/2011. (When I put the files on my server).
The template was copy written for 2009-2010. Could this be the problem?

28 Apr 2011, 1:57 PM
#10
gjh42 avatar

gjh42

Black Belt

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

Re: Display a page without the categories

I meant "the date in the head of the file"... if your version of html_header.php is not
@version $Id: html_header.php 15761 2010-03-31 19:31:27Z drbyte $
it will not have the line of code to handle ez-page stylesheets. Does your file have this if( statement following the $tmp_ statement?```php
$tmp_pagename = ($this_is_home_page) ? 'index_home' : $current_page_base;
if ($current_page_base == 'page' && isset($ezpage_id)) $tmp_pagename = $current_page_base . (int)$ezpage_id;

28 Apr 2011, 2:03 PM
#11
davisz avatar

davisz

Zen Follower

Join Date:
Jan 2011
Posts:
141
Plugin Contributions:
0

Re: Display a page without the categories

This is the version statement

  • @version $Id: html_header.php 6948 2007-09-02 23:30:49Z drbyte $

Below is the content of that file. Sorry for the bit of spam I just want to be clear as to what was in the file for you.

<?php
/**
* Template designed by 12leaves.com
* 12leaves.com - Free ecommerce templates and design services
*
* Common Template
* 
* @package languageDefines
* @copyright Copyright 2009-2010 12leaves.com
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: html_header.php 6948 2007-09-02 23:30:49Z drbyte $
*/
/**
 * load the module for generating page meta-tags
 */
require(DIR_WS_MODULES . zen_get_module_directory('meta_tags.php'));
/**
 * output main page HEAD tag and related headers/meta-tags, etc
 */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>
<head>
<title><?php echo META_TAG_TITLE; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />
<meta name="keywords" content="<?php echo META_TAG_KEYWORDS; ?>" />
<meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="author" content="The Zen Cart™ Team and others" />
<meta name="generator" content="shopping cart program by Zen Cart™, http://www.zen-cart.com eCommerce" />
<?php if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base=='down_for_maintenance' || $robotsNoIndex === true) { ?>
<meta name="robots" content="noindex, nofollow" />
<?php } ?>
<?php if (defined('FAVICON')) { ?>
<link rel="icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo FAVICON; ?>" type="image/x-icon" />
<?php } //endif FAVICON ?>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ); ?>" />

<?php

/**
 * load all template-specific stylesheets, named like "style*.css", alphabetically
 */
  $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^style/', '.css');
  while(list ($key, $value) = each($directory_array)) {
    echo '<link rel="stylesheet" type="text/css" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n";
  }
/**
 * load stylesheets on a per-page/per-language/per-product/per-manufacturer/per-category basis. Concept by Juxi Zoza.
 */
  $manufacturers_id = (isset($_GET['manufacturers_id'])) ? $_GET['manufacturers_id'] : '';
  $tmp_products_id = (isset($_GET['products_id'])) ? (int)$_GET['products_id'] : '';
  $tmp_pagename = ($this_is_home_page) ? 'index_home' : $current_page_base;
  $sheets_array = array('/' . $_SESSION['language'] . '_stylesheet', 
                        '/' . $tmp_pagename, 
                        '/' . $_SESSION['language'] . '_' . $tmp_pagename, 
                        '/c_' . $cPath,
                        '/' . $_SESSION['language'] . '_c_' . $cPath,
                        '/m_' . $manufacturers_id,
                        '/' . $_SESSION['language'] . '_m_' . (int)$manufacturers_id, 
                        '/p_' . $tmp_products_id,
                        '/' . $_SESSION['language'] . '_p_' . $tmp_products_id
                        );
  while(list ($key, $value) = each($sheets_array)) {
    //echo "<!--looking for: $value-->\n";
    $perpagefile = $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . $value . '.css';
    if (file_exists($perpagefile)) echo '<link rel="stylesheet" type="text/css" href="' . $perpagefile .'" />'."\n";
  }

/**
 * load printer-friendly stylesheets -- named like "print*.css", alphabetically
 */
  $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^print/', '.css');
  sort($directory_array);
  while(list ($key, $value) = each($directory_array)) {
    echo '<link rel="stylesheet" type="text/css" media="print" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n";
  }

/**
 * load all site-wide jscript_*.js files from includes/templates/YOURTEMPLATE/jscript, alphabetically
 */
  $directory_array = $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.js');
  while(list ($key, $value) = each($directory_array)) {
    echo '<script type="text/javascript" src="' .  $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value . '"></script>'."\n";
  }

/**
 * load all page-specific jscript_*.js files from includes/modules/pages/PAGENAME, alphabetically
 */
  $directory_array = $template->get_template_part($page_directory, '/^jscript_/', '.js');
  while(list ($key, $value) = each($directory_array)) {
    echo '<script type="text/javascript" src="' . $page_directory . '/' . $value . '"></script>' . "\n";
  }

/**
 * load all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically
 */
  $directory_array = $template->get_template_part($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript'), '/^jscript_/', '.php');
  while(list ($key, $value) = each($directory_array)) {
/**
 * include content from all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically.
 * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
 */
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/' . $value); echo "\n";
  }
/**
 * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
 */
  $directory_array = $template->get_template_part($page_directory, '/^jscript_/');
  while(list ($key, $value) = each($directory_array)) {
/**
 * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
 * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
 */
    require($page_directory . '/' . $value); echo "\n";
  }

//DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';
?>
</head>
<?php // NOTE: Blank line following is intended: ?>

Seems as though mine is quite dated. This appears to be the only issue I've had in terms of 'date in which it was created' almost everything has worked. Is there a way I can update this file?

28 Apr 2011, 6:50 PM
#12
gjh42 avatar

gjh42

Black Belt

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

Re: Display a page without the categories

To update the file, you would need to compare yours to the original file of that date (since you would not have a custom template copy of it if it were not different) and the original to the current v1.3.9h /template_default/ version. Use Winmerge (free) or another file comparison utility.

Comparison with the original will tell you what the template maker customized (take complete notes).
Comparison of the original with the 1.3.9h copy will tell you what is new (again, take notes).

Then put the customized code into the 1.3.9h copy of the file. If the new version and the customized version touch the same lines of code, you may need some expert advice to merge them.

29 Apr 2011, 7:10 PM
#13
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Display a page without the categories

What tools (program) did you use to write that CSS file?

20 years a Zencart User

1 May 2011, 1:20 AM
#14
davisz avatar

davisz

Zen Follower

Join Date:
Jan 2011
Posts:
141
Plugin Contributions:
0

Re: Display a page without the categories

@gjh42 - I'll look into this.

@Schoolboy - This was provided by my template that I downloaded. It is called lite_red made by 12leaves. Do you have any thoughts on this topic?