marty.net 1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

YOU ARE HERE:
Change breadcrumb store name

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « Change breadcrumb store name »
Welcome, Guest. Please Login or Register.
12/12/17 at 15:49:03
Home Help Search Login Register
   marty.net message board
   About cpshop
   Customization Help
   Change breadcrumb store name
(Moderator: Marty)
Pages: 1 2 » Reply Notify of replies Send the topic Print 
   Author  Topic: Change breadcrumb store name  (Read 2258 times)
herbbread
Green Dragon
*

Posts: 6




   

WWW
Change breadcrumb store name
« on: 10/12/11 at 21:45:39 »
Reply with quote Modify message

I was wondering if there was a way to change the store name for my breadcrumb trail.  For SEO reasons, the title for my pages is long: "Necessary and Sufficient Tees - Science and Gaming Shirts"

When the breadcrumb trail displays, it shows something like:

Necessary and Sufficient Tees - Science and Gaming Shirts > Neuroscience > Sleepy Serotonin

Is there a way to change the "store page name" without changing the title so that it looks something like:

Standard Collection > Neuroscience > Sleepy Serotonin
Logged

Necessary and Sufficient Tees - Science and Gaming Shirts
Awesome brain, neuron, Starcraft, and e-Sports shirts
KaptainMyke.com
Gold Dragon
****

Gender: male
Posts: 210



KaptainMyke.com , Inc.
   

WWW E-Mail
Re: Change breadcrumb store name
« Reply #1 on: 11/12/11 at 16:51:53 »
Reply with quote Modify message

I been asking the same thing myself.  We also need to get rid of (dark) in the titles of products as well...SEO doesn't like parenthesis or commas!
Logged

Mike "KaptainMyke" Sorensen
www.kaptainmyke.com
KaptainMyke.com, Inc.
CEO
Hex Angel - Patrick
Gold Dragon
****

Posts: 500



Our nature lies in movement; complete calm is death.
   

WWW
Re: Change breadcrumb store name
« Reply #2 on: 11/16/11 at 03:30:47 »
Reply with quote Modify message

Don't try this just yet... not quite working as expected...

Herb,

You can use the image file to make that substitution.

But there's a more direct route, and it's a lot more efficent...
And it's pretty simple....

Open cpshop.cgi and find the line that reads.


Code:
$hacked = 0;


Change it to


Code:
$hacked = 1;


A few lines further down, you'll find this code section (it appears in cpshop.cgi twice, you want the first one)


Code:
     # use cpshop to get our template and fill it with our content.
   &gettemplate;
   $html =~ s/<\[title\]>/$pagetitle/g;
   $html =~ s/<\[breadcrumb\]>/$breadcrumb/g;


You're going to add one line...and a comment... (I use my initials, pmj, in comments -- makes it easy to find changes later)


Code:
     # use cpshop to get our template and fill it with our content.
   &gettemplate;
   $html =~ s/<\[title\]>/$pagetitle/g;

       # pmj -- shorten storename in the breadcrumb
   $breadcrumb =~ s/Necessary and Sufficient Tees - Science and Gaming Shirts/Standard Collection/g;
   $html =~ s/<\[breadcrumb\]>/$breadcrumb/g;


Myke, for your issue... also set hacked=1; And then find this line just below the lines above...
     

Code:
   $html =~ s/<\[content\]>/$content/;


Insert a line like this


Code:
       # pmj - get rid of parentheses for some dark fabrics
    $content =~ s/\(dark\)/- dark fabrics/g;
    $html =~ s/<\[content\]>/$content/;


Or, you could be a bit cheekier, because "(dark)" only appears after T-Shirt, Sweatshirt or Hoodie, and sometimes my product names are too long, so it reads "T-Shirt (da" -- and you might as well get them all, so


Code:
     # use cpshop to get our template and fill it with our content.
 &gettemplate;

       # pmj -- shorten storename in the breadcrumb
 $breadcrumb =~ s/Necessary and Sufficient Tees - Science and Gaming Shirts/Standard Collection/g;

       # pmj - get rid of parentheses for some dark fabrics
 $breadcrumb =~ s/(T-Shirt|Sweatshirt|Hoodie) (\(dark\)|\(dark|\(dar|\(da|\(d|\()/Dark $1/;
 $pagetitle =~ s/(T-Shirt|Sweatshirt|Hoodie) (\(dark\)|\(dark|\(dar|\(da|\(d|\()/Dark $1/;
 $content =~ s/(T-Shirt|Sweatshirt|Hoodie) (\(dark\)|\(dark|\(dar|\(da|\(d|\()/Dark $1/g;
 
 $html =~ s/<\[breadcrumb\]>/$breadcrumb/g;
 $html =~ s/<\[title\]>/$pagetitle/g;
 $html =~ s/<\[content\]>/$content/;


Oh, one caveat -- try these in a test store first -- a misplaced semi-colon or forward slash in one of these lines will cause your whole site to go 500.




« Last Edit: 11/16/11 at 16:57:22 by Hex Angel - Patrick » Logged

CPSHOP
www.PeaceAndLoveShop.com Namaste
BLOG
www.TheNomadicSpirit.com Inspired by travel
www.GodBeautyPerfectionLove.com Inspired by spirit
www.MyMuseMoviesMusicAndBooks.com Inspired by the arts
KaptainMyke.com
Gold Dragon
****

Gender: male
Posts: 210



KaptainMyke.com , Inc.
   

WWW E-Mail
Re: Change breadcrumb store name
« Reply #3 on: 11/16/11 at 06:44:29 »
Reply with quote Modify message

Mines different.   My primary template uses <[title]> as the title, and breadcrumb and content highlighted for main page.  I popped in a "TITLE" and "CRUMB" just so I could see that action, but nothing works.... ideas?  I also noticed your title tag is called $title when mine calls for $pagetitle.... so I plugged in either and it still isn't displaying properly....


Code:
$hacked = 1;

if ($hacked) {
&gettemplate;
     # mfs -- remove Dark in the title
   $pagetitle =~ s/(T-Shirt|Sweatshirt|Hoodie) (\(dark\)|\(dark|\(dar|\(da|\(d|\()/Dark $1/;
   $title =~ s/(T-Shirt|Sweatshirt|Hoodie) (\(dark\)|\(dark|\(dar|\(da|\(d|\()/Dark $1/;
      # mfs -- shorten storename in the title
   $pagetitle =~ s/TITLE/$pagetitle/g;
   $html =~ s/<\[title\]>/$pagetitle/g;
      # mfs -- shorten storename in the breadcrumb
   $breadcrumb =~ s/CRUMB/$breadcrumb/g;
      # mfs - get rid of parentheses for some dark fabrics
   $breadcrumb =~ s/(T-Shirt|Sweatshirt|Hoodie) (\(dark\)|\(dark|\(dar|\(da|\(d|\()/Dark $1/;
   $pagetitle =~ s/(T-Shirt|Sweatshirt|Hoodie) (\(dark\)|\(dark|\(dar|\(da|\(d|\()/Dark $1/;
   $content =~ s/(T-Shirt|Sweatshirt|Hoodie) (\(dark\)|\(dark|\(dar|\(da|\(d|\()/Dark $1/g;
   $html =~ s/<\[content\]>/$content/;

   unless (@ARGV) {
       print "Content-Type: text/html\n\n";
   }
   print $html;
   exit;

     
} else {
   &gettemplate;
   $html =~ s/<\[title\]>/$pagetitle/g;
   $html =~ s/<\[breadcrumb\]>/$breadcrumb/g;
   $html =~ s/<\[content\]>/$content/;

   unless (@ARGV) {
       print "Content-Type: text/html\n\n";
   }
   print $html;
   exit;
}


I use a second template for products, so I can use <[productname]> in the title tag.  This works beautifully, however your dark removal code does not work at all in my titles on that said product page cptemplate, not matter what I try....same thing for breadcrumbs.  Your dark removal code works in the content, but not for replacing title or breadcrumb for some odd reason.  I feel like I'm almost there, but not quite.
« Last Edit: 11/16/11 at 16:41:09 by KaptainMyke.com » Logged

Mike "KaptainMyke" Sorensen
www.kaptainmyke.com
KaptainMyke.com, Inc.
CEO
Hex Angel - Patrick
Gold Dragon
****

Posts: 500



Our nature lies in movement; complete calm is death.
   

WWW
Re: Change breadcrumb store name
« Reply #4 on: 11/16/11 at 16:56:35 »
Reply with quote Modify message

Hey Myke....

Yah, My bad. There were a couple little bugs in that code, including the $pagetitle. (And I forget what the original cpshop.cgi looks like because I haven't downloaded it in years.)

Also, I only tested it on $content before posting ... and like you I'm a tad perplexed it's not working on the title or breadcrumb code -- that's what's not working as expected.

It was too late to figure it out last night. I'm having another go this AM.


Logged

CPSHOP
www.PeaceAndLoveShop.com Namaste
BLOG
www.TheNomadicSpirit.com Inspired by travel
www.GodBeautyPerfectionLove.com Inspired by spirit
www.MyMuseMoviesMusicAndBooks.com Inspired by the arts
KaptainMyke.com
Gold Dragon
****

Gender: male
Posts: 210



KaptainMyke.com , Inc.
   

WWW E-Mail
Re: Change breadcrumb store name
« Reply #5 on: 11/16/11 at 17:51:19 »
Reply with quote Modify message

ok.  Only way I got it to work:


Code:
$hacked = 1;

if ($hacked) {
&gettemplate;

     # look for Funny Shirts - KaptainMyke and strip out of page title
   $pagetitle =~ s/- Funny Shirts - KaptainMyke//g;
   $pagetitle =~ s/- Apparel - Popular Shirts - KaptainMyke//g;
   $pagetitle =~ s/- Apparel - New Shirts - Gifts - KaptainMyke//g;
   $pagetitle =~ s/- Movie Shirts - KaptainMyke/Movie Shirts/g;
   $pagetitle =~ s/- TV Shirts - KaptainMyke/TV Shirts/g;
   $pagetitle =~ s/- TV Shirts - Apparel - Super Hero Shirts - Gifts - KaptainMyke/ Superhero Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - Halloween Shirts - KaptainMyke/ Halloween/g;
   $pagetitle =~ s/TV Shirts - Apparel - Halloween Shirts - KaptainMyke/ Halloween/g;
   $pagetitle =~ s/Movie Shirts - Apparel - Valentines Day Shirts - KaptainMyke/ Valentines Day/g;
   $pagetitle =~ s/TV Shirts - Apparel - Valentines Day Shirts - KaptainMyke/ Valentines Day/g;
   $pagetitle =~ s/Retro Shirts - Apparel - Valentines Day Shirts - KaptainMyke/ Valentines Day/g;
   $pagetitle =~ s/Movie Shirts - Apparel - Saint Patricks Day Shirts - KaptainMyke/ St Patricks Day/g;
   $pagetitle =~ s/TV Shirts - Apparel - Saint Patricks Day Shirts - KaptainMyke/ St Patricks Day/g;
   $pagetitle =~ s/Funny Shirts - Apparel - Saint Patricks Day Shirts - KaptainMyke/ St Patricks Day/g;
   $pagetitle =~ s/Movie Shirts - Apparel - 1990s 90s Nineties T-Shirts - KaptainMyke/ 90s Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - 1980s 80s Eighties T-Shirts - KaptainMyke/ 80s Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - 1970s 70s Seventies T-Shirts - KaptainMyke/ 70s Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - 1960s 60s Sixties T-Shirts - KaptainMyke/ 60s Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - 2000-Present T-Shirts - KaptainMyke/ 2000s Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - 1990s 90s Nineties T-Shirts - KaptainMyke/ 90s Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - 1980s 80s Eighties T-Shirts - KaptainMyke/ 80s Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - 1970s 70s Seventies T-Shirts - KaptainMyke/ 70s Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - 1960s 60s Sixties T-Shirts - KaptainMyke/ 60s Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - 2000-Present T-Shirts - KaptainMyke/ 2000s Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - 1990s 90s Nineties T-Shirts - KaptainMyke/ 90s Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - 1980s 80s Eighties T-Shirts - KaptainMyke/ 80s Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - 1970s 70s Seventies T-Shirts - KaptainMyke/ 70s Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - 1960s 60s Sixties T-Shirts - KaptainMyke/ 60s Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - 2000-Present T-Shirts - KaptainMyke/ 2000s Shirts/g;
   $html =~ s/<\[title\]>/$pagetitle/g;
      # mfs -- shorten storename in the breadcrumb
   $breadcrumb =~ s/KaptainMyke/$breadcrumb/g;
      # mfs - get rid of parentheses for some dark fabrics
   $content =~ s/(T-Shirt|Sweatshirt|Hoodie) (\(dark\)|\(dark|\(dar|\(da|\(d|\()/Dark $1/g;
   $html =~ s/<\[content\]>/$content/;

   unless (@ARGV) {
       print "Content-Type: text/html\n\n";

   }
   print $html;
   exit;

     
} else {
   &gettemplate;
   $html =~ s/<\[title\]>/$pagetitle/g;
   $html =~ s/<\[breadcrumb\]>/$breadcrumb/g;
   $html =~ s/<\[content\]>/$content/;

   unless (@ARGV) {
       print "Content-Type: text/html\n\n";
   }
   print $html;
   exit;
}


Only problem now is I can't strip "(dark)" from titles on my product page template....due to me using <[productname]> plugged into the <title> part of the html body.  Because I do not know the exact variable that CP passes on as product name, I cannot strip it as I finally did with the $pagetitle variable.

By the way, a thousand thanks to you for helping me....
« Last Edit: 11/16/11 at 18:26:34 by KaptainMyke.com » Logged

Mike "KaptainMyke" Sorensen
www.kaptainmyke.com
KaptainMyke.com, Inc.
CEO
KaptainMyke.com
Gold Dragon
****

Gender: male
Posts: 210



KaptainMyke.com , Inc.
   

WWW E-Mail
Re: Change breadcrumb store name
« Reply #6 on: 11/16/11 at 18:27:08 »
Reply with quote Modify message

Boom.  Hacked.  (Except the (dark) in titles of products.)

I sure hope this makes my SEO better, and not penalized or lose traffic.  My bandwidth for once is through the roof.  I had to upgrade my dedicated server this week.
« Last Edit: 11/16/11 at 18:27:50 by KaptainMyke.com » Logged

Mike "KaptainMyke" Sorensen
www.kaptainmyke.com
KaptainMyke.com, Inc.
CEO
Hex Angel - Patrick
Gold Dragon
****

Posts: 500



Our nature lies in movement; complete calm is death.
   

WWW
Re: Change breadcrumb store name
« Reply #7 on: 11/16/11 at 18:54:51 »
Reply with quote Modify message

OK, figured it out.  

First, the changes to the breadcrumb weren't working because <[breadcrumb]> has already been filled into the template by the time we get it. So, to get around that, instead of putting "<[breadcrumb]>" in your template, put "<|breadcrumb|>".

Second, we'll simplify the changes for (dark) by just applying them to the whole page (template and contents). This will work fine so long as you never enter any CP descriptions or template text that reads something like "I love a T-shirt (daring, yes, I know)", which will appear as "I love a Dark T-Shirt ring, yes, I know)".

Now your code will look something like this...just replace the title text as needed.


Code:
$hacked = 1;

if ($hacked) {
  &gettemplate;

      # mfs -- shorten the page title in breadcrumbs
  $breadcrumb =~ s/Your Too Long Page Title/Shortened Title/;
  $html =~ s/<\|breadcrumb\|>/$breadcrumb/g;
 
  $html =~ s/<\[title\]>/$pagetitle/g;
  $html =~ s/<\[content\]>/$content/;

      # mfs -- page-wide fixup for (dark) in certain products
  $html =~ s/(T-Shirt|Sweatshirt|Hoodie) (\(dark\)|\(dark|\(dar|\(da|\(d|\()/Dark $1/g;

  unless (@ARGV) {
      print "Content-Type: text/html\n\n";
  }
  print $html;
  exit;

   
} else {
  &gettemplate;
  $html =~ s/<\[title\]>/$pagetitle/g;
  $html =~ s/<\[breadcrumb\]>/$breadcrumb/g;
  $html =~ s/<\[content\]>/$content/;

  unless (@ARGV) {
      print "Content-Type: text/html\n\n";
  }
  print $html;
  exit;
}


I've tested all elements of that code, so it should work for you.
Logged

CPSHOP
www.PeaceAndLoveShop.com Namaste
BLOG
www.TheNomadicSpirit.com Inspired by travel
www.GodBeautyPerfectionLove.com Inspired by spirit
www.MyMuseMoviesMusicAndBooks.com Inspired by the arts
Hex Angel - Patrick
Gold Dragon
****

Posts: 500



Our nature lies in movement; complete calm is death.
   

WWW
Re: Change breadcrumb store name
« Reply #8 on: 11/16/11 at 19:06:02 »
Reply with quote Modify message

Heh -- just saw yours...  Nice.

A couple changes to our code: presently --


Code:
     # mfs -- shorten storename in the breadcrumb
  $breadcrumb =~ s/KaptainMyke/$breadcrumb/g;
     # mfs - get rid of parentheses for some dark fabrics
  $content =~ s/(T-Shirt|Sweatshirt|Hoodie) (\(dark\)|\(dark|\(dar|\(da|\(d|\()/Dark $1/g;
  $html =~ s/<\[content\]>/$content/;



Code:
  $html =~ s/<\[content\]>/$content/;

    # mfs - get rid of parentheses for some dark fabrics on the entire page
  $html =~ s/(T-Shirt|Sweatshirt|Hoodie) (\(dark\)|\(dark|\(dar|\(da|\(d|\()/Dark $1/g;


The breadcrumb line wasn't doing anything.

Applying the change to $html after putting the content in it means you'll get the title as well.

Cheers,

Patrick.
« Last Edit: 11/16/11 at 19:06:43 by Hex Angel - Patrick » Logged

CPSHOP
www.PeaceAndLoveShop.com Namaste
BLOG
www.TheNomadicSpirit.com Inspired by travel
www.GodBeautyPerfectionLove.com Inspired by spirit
www.MyMuseMoviesMusicAndBooks.com Inspired by the arts
Hex Angel - Patrick
Gold Dragon
****

Posts: 500



Our nature lies in movement; complete calm is death.
   

WWW
Re: Change breadcrumb store name
« Reply #9 on: 11/16/11 at 19:25:34 »
Reply with quote Modify message

The variable for <[productname]> is ... wait for it ...

$productname  

It's like that for most of the tags. If you ever want to know what the tag's cpshop variable is, for sure, just search cpdata.lib for the tag as you'd write it in the template.

Congrats on the booming traffic!

And you're most welcome... actually, I'd been intending to do this with my own shop, so thank you for the kick in the pants.

cheers,

Patrick.
Logged

CPSHOP
www.PeaceAndLoveShop.com Namaste
BLOG
www.TheNomadicSpirit.com Inspired by travel
www.GodBeautyPerfectionLove.com Inspired by spirit
www.MyMuseMoviesMusicAndBooks.com Inspired by the arts
Hex Angel - Patrick
Gold Dragon
****

Posts: 500



Our nature lies in movement; complete calm is death.
   

WWW
Re: Change breadcrumb store name
« Reply #10 on: 11/16/11 at 20:41:30 »
Reply with quote Modify message

oh, and as for SEO, I recently read that there are two formats that are optimal for titles:

Primary Keyword Secondary Keyword - brand
Brand - Primary Keyword Secondary Keyword

<smile> yours were definitely longer than that.

It makes sense. Not just for search engines, but also for people looking for stuff in search results.  Being #1, 2 or three in the results is no good to *you* if #4 leaps off the page for me, your potential customer, with simple directness in their keyword, grabbing attention and and my clicks -- i'll often skim past the first couple looking for a better match when searching.
Logged

CPSHOP
www.PeaceAndLoveShop.com Namaste
BLOG
www.TheNomadicSpirit.com Inspired by travel
www.GodBeautyPerfectionLove.com Inspired by spirit
www.MyMuseMoviesMusicAndBooks.com Inspired by the arts
KaptainMyke.com
Gold Dragon
****

Gender: male
Posts: 210



KaptainMyke.com , Inc.
   

WWW E-Mail
Re: Change breadcrumb store name
« Reply #11 on: 11/16/11 at 23:03:08 »
Reply with quote Modify message

Oh my God.  YOU ARE A GENIUS.

I owe you.  Big time.
Logged

Mike "KaptainMyke" Sorensen
www.kaptainmyke.com
KaptainMyke.com, Inc.
CEO
KaptainMyke.com
Gold Dragon
****

Gender: male
Posts: 210



KaptainMyke.com , Inc.
   

WWW E-Mail
Re: Change breadcrumb store name
« Reply #12 on: 11/16/11 at 23:37:58 »
Reply with quote Modify message

How come it doesn't work for the stickers?

trying it for the oval and rectangle and bumper and doesn't work
Logged

Mike "KaptainMyke" Sorensen
www.kaptainmyke.com
KaptainMyke.com, Inc.
CEO
KaptainMyke.com
Gold Dragon
****

Gender: male
Posts: 210



KaptainMyke.com , Inc.
   

WWW E-Mail
Re: Change breadcrumb store name
« Reply #13 on: 11/17/11 at 00:18:27 »
Reply with quote Modify message

Fixed.

Here's my final code:


Code:
$hacked = 1;

if ($hacked) {
&gettemplate;

     # look for Funny Shirts - KaptainMyke and strip out of page title
   $pagetitle =~ s/- Funny Shirts - KaptainMyke//g;
   $pagetitle =~ s/- Apparel - Popular Shirts - KaptainMyke//g;
   $pagetitle =~ s/- Apparel - New Shirts - Gifts - KaptainMyke//g;
   $pagetitle =~ s/- Movie Shirts - KaptainMyke/Movie Shirts/g;
   $pagetitle =~ s/- TV Shirts - KaptainMyke/TV Shirts/g;
   $pagetitle =~ s/- TV Shirts - Apparel - Super Hero Shirts - Gifts - KaptainMyke/ Superhero Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - Halloween Shirts - KaptainMyke/ Halloween Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - Halloween Shirts - KaptainMyke/ Halloween Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - Valentines Day Shirts - KaptainMyke/ Valentines Day Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - Valentines Day Shirts - KaptainMyke/ Valentines Day Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - Valentines Day Shirts - KaptainMyke/ Valentines Day Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - Saint Patricks Day Shirts - KaptainMyke/ St Patricks Day Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - Saint Patricks Day Shirts - KaptainMyke/ St Patricks Day Shirts/g;
   $pagetitle =~ s/Funny Shirts - Apparel - Saint Patricks Day Shirts - KaptainMyke/ St Patricks Day Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - 1990s 90s Nineties T-Shirts - KaptainMyke/ 90s Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - 1980s 80s Eighties T-Shirts - KaptainMyke/ 80s Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - 1970s 70s Seventies T-Shirts - KaptainMyke/ 70s Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - 1960s 60s Sixties T-Shirts - KaptainMyke/ 60s Shirts/g;
   $pagetitle =~ s/Movie Shirts - Apparel - 2000-Present T-Shirts - KaptainMyke/ 2000s Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - 1990s 90s Nineties T-Shirts - KaptainMyke/ 90s Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - 1980s 80s Eighties T-Shirts - KaptainMyke/ 80s Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - 1970s 70s Seventies T-Shirts - KaptainMyke/ 70s Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - 1960s 60s Sixties T-Shirts - KaptainMyke/ 60s Shirts/g;
   $pagetitle =~ s/TV Shirts - Apparel - 2000-Present T-Shirts - KaptainMyke/ 2000s Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - 1990s 90s Nineties T-Shirts - KaptainMyke/ 90s Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - 1980s 80s Eighties T-Shirts - KaptainMyke/ 80s Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - 1970s 70s Seventies T-Shirts - KaptainMyke/ 70s Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - 1960s 60s Sixties T-Shirts - KaptainMyke/ 60s Shirts/g;
   $pagetitle =~ s/Retro Shirts - Apparel - 2000-Present T-Shirts - KaptainMyke/ 2000s Shirts/g;
   $html =~ s/<\[title\]>/$pagetitle/g;
   $html =~ s/<\[content\]>/$content/;
      # mfs - get rid of parentheses for some dark fabrics on the entire page
   $html =~ s/(T-Shirt|Sweatshirt|Hoodie) (\(dark\)|\(dark|\(dar|\(da|\(d|\()/Dark $1/g;
   $html =~ s/Stackable Mug Set \(4 mugs\)/4 Stackable Mugs/g;
   $html =~ s/\(12oz\)/12 Ounce/g;
   $html =~ s/0.6L/Half Liter/g;
   $html =~ s/1.0L/1 Liter/g;
   $html =~ s/Sticker \(Rectangle\)/Rectangle Sticker/g;
   $html =~ s/Sticker \(Oval\)/Oval Sticker/g;
   $html =~ s/Sticker \(Bumper\)/Bumper Sticker/g;
   $html =~ s/Women's/Womens/g;
   $html =~ s/Men's/Mens/g;
   $html =~ s/Kid's/Kids/g;
   $html =~ s/Children's/Childrens/g;
   $html =~ s/Jr. Raglan/Jr Raglan/g;
   $html =~ s/Jr. Ringer/Jr Ringer/g;
   $html =~ s/Jr. Spaghetti/Jr Spaghetti/g;
   $html =~ s/Womens Plus Size V-Neck T-Shirt/Plus Size V-Neck Shirt/g;
   $html =~ s/Womens Plus Size Scoop Neck T-Shirt/Plus Size Scoop Neck Shirt/g;
   unless (@ARGV) {
       print "Content-Type: text/html\n\n";

   }
   print $html;
   exit;

     
} else {
   &gettemplate;
   $html =~ s/<\[title\]>/$pagetitle/g;
   $html =~ s/<\[breadcrumb\]>/$breadcrumb/g;
   $html =~ s/<\[content\]>/$content/;

   unless (@ARGV) {
       print "Content-Type: text/html\n\n";
   }
   print $html;
   exit;
}

1;
Logged

Mike "KaptainMyke" Sorensen
www.kaptainmyke.com
KaptainMyke.com, Inc.
CEO
dmp65
Gold Dragon
****

Posts: 57



Go Scots!
   

Re: Change breadcrumb store name
« Reply #14 on: 11/17/11 at 19:06:30 »
Reply with quote Modify message

Is there a way to edit this script so the page title just shows the product name/type and store name, instead of the uber long breadcrumb trail?

For example, I'd like the page title to show as: I Love NY White T-Shirt - NY Shirt Store

I Love NY = product name
White T-Shirt = product type
NY Shirt Store = store name

I have so many breadcrumb variations that it would take forever to do it the same way you're doing (listing every combo of breadcrumb title).

Any help is appreciated!

Dave
Logged
Pages: 1 2 » Reply Notify of replies Send the topic Print 
Jump to:


marty.net message board (http://www.marty.net/cgi/marty/board/messageboard)

Powered by YaBB 1 Gold - Release (Yet Another Bulletin Board)
Copyright 2000-2001, X-Null. All Rights Reserved.