Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Advanced Title tag Code Question
Author « Topic »  

tgorski
Ecommerce Template Expert

USA
918 Posts

Posted - 12/12/2017 :  13:58:19  
I have implemented the advanced title tag to a site (products.php) with the following code...

<?php $pno = (isset($_GET['pg']) && is_numeric($_GET['pg'])) ? (int)$_GET['pg'] : 1; $pagenumber = ' page ' . $pno; ?>
<title><?php
if(!empty($pagetitle) && $pno == 1) {print $pagetitle;}
else if(!empty($pagetitle) && $pno != 1){print $pagetitle . $pagenumber;}
else if(!empty($sectionname) && $pno == 1) {print $sectionname . ' | ' . $sitename;}
else if(!empty($sectionname) && $pno != 1) {print $sectionname . ' | ' . $sitename . $pagenumber;}
else if($pno == 1) {print $allpagestitle;}
else {print $allpagestitle . $pagenumber;} ?></title>

My question is... On Sub categories, how can this be rewritten to show the category name of the category above WITH the current category?
i.e. CATEGORYNAME | CATEGORYABOVE
Kind of like a Cheese Spreads Category and the subcategory name is Smoked... the title would read "Smoked | Cheese Spreads | Etc."



Tim Gorski

Sinbad
ECT Moderator

USA
65937 Posts

Posted - 12/12/2017 :  15:18:26  
Hi Tim, I would think you need to print $topsection, can you post your question on this post where the code came from https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=105972

Winners never quit, quitters never win
CSS and Responsive Designs
User Manual for Ecommerce Templates
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.02 seconds. Snitz Forums 2000