Hi, I have created a
Static URL for a
Menu Category as described here :
https://www.ecommercetemplates.com/seo/static-url-php.aspWhy? It is handy to be able to lock down the page URL address, so if the Menu Category Name changes, the URL does not.
Or maybe you would like to use the
$productpagelayout feature to setup a different layout for one particular Menu Category.
i.e. In Category Admin, where it says Category URL (Optional): I entered "
website-design-portfolio.php"
Open
products.php, do a File ... Save As ...
website-design-portfolio.phpThe Menu Category Number is
(3)Modify opening lines to read
==========================================
<?php session_cache_limiter('none'); session_start(); ob_start(); include "vsadmin/db_conn_open.php"; include "vsadmin/inc/languagefile.php"; include "vsadmin/includes.php"; include "vsadmin/inc/incfunctions.php";
$explicitid=3;
include "vsadmin/inc/metainfo.php"
?><!DOCTYPE html>
==========================================
In the <head>, I have this for page title
==========================================
<?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($topsection != "" && $pno == 1) {print $sectionname . ' | ' . $sitename;}
else if($topsection != "" && $pno != 1) {print $sectionname . ' | ' . $sitename . $pagenumber;}
else if(!empty($manname) && $pno == 1) {print $manname . ' | ' . $sitename;}
else if(!empty($manname) && $pno != 1) {print $manname . ' | ' . $sitename . $pagenumber;}
else if($pno == 1) {print $allpagestitle;}
else {print $allpagestitle . $pagenumber;}
?></title>==========================================
and for the short description
==========================================
<meta name="Description" content="
<?phpif(!empty($sectiondescription) && $pno < 2) {print $sectiondescription;}
else if(!empty($sectiondescription) && $pno > 1) {print $sectiondescription . ' ' . $pagenumber;}
else if($pno < 2) {print $allpagesdescription;}
else {print $allpagesdescription . ' ' . $pagenumber;}
?>">
==========================================
Further down in the <body>, i have this
==========================================
<h1><?php if(!empty($pagetitle) && $pno == 1) {print $pagetitle;}
else if(!empty($pagetitle) && $pno != 1){print $pagetitle . $pagenumber;}
else if($topsection != "" && $pno == 1) {print $sectionname;}
else if($topsection != "" && $pno != 1) {print $sectionname . $pagenumber;}
else if(!empty($manname) && $pno == 1) {print $manname;}
else if(!empty($manname) && $pno != 1) {print $manname . $pagenumber;}
else if($pno == 1) {print $allpagestitle;}
else {print $allpagestitle . $pagenumber;}
?></h1><?php include "vsadmin/inc/incproducts.php"
?>==========================================
Neither the Menu Category Name $sectionname or Short Description $sectiondescription are imported by metainfo.php.
What is printed are the
$allpagestitle and
$allpagesdescription. Both those parameters I created and added to
includes.php, as described here :
https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=101377Even if I dumb-down the code to the basic
==========================================
<title><?php print $sectionname
?></title>==========================================
that prints nothing.
Tried following the advice given here
https://www.ecommercetemplates.com/seo/dynamic-title-meta-php.aspi.e. In Category Admin, where it says Page Title Tag (Optional): I entered "Website Design Portfolio"
==========================================
<title><?php print $pagetitle
?></title>==========================================
that prints nothing.
When creating a Static URL for a Menu Category, can you offer me any solution on how to print the Menu
Category Name and
Short Description dynamically please ?
Gary
