USANet Creations
Users Support and Discussion Areas

NOTE: Always state the software package you have
when asking questions so you will get the correct answer,
as it does make a big difference in the answers you'll get!

| Main Site Home Page | Forums Home Page |

Subject: "Change duplicate category titles"   Previous Topic | Next Topic
nonePrinter-friendly copy    
Conferences MakeBid Auction users addons and fixes Topic #332
Reading page 1 of 1 pages
shnippy click here to view user rating
Charter Member
493 posts, 2 feedbacks, 4 points
Nov-01-09, 03:34 PM (CST)
Click to add this user to your buddy list  
"Change duplicate category titles"
 
   welp, here i go again.

i am working on makingit so each category page has its own title, in regards to the selected category.

instead of one page title for all categories.

works pretty well, except for one thing, it ends up looking like this in the title bar at the top of the browser page:

Fakesitename <!--antiques-->Antique Furniture

which is ok, but if i could get it to display is like:

Fakesitename Antique Furniture

so im trying to get it to display everything but the "<!--antiques-->", as i cant seem to hide it

that would be great. this is the code i am using:
print qq~
<SCRIPT type="text/javascript">
<!--
document.title="$config{'sitename'} $category{$form{'category'}}";
// -->
</SCRIPT>
~;

i have tried different combos of the:
$category{$form{'category'}}

like:

{$form{'category'}} (shows the category like in the config though, so cant use)

$category (adding just this, cuts the site off, so cant use this)

any ideas on a good combo to use to display the category title at the top of the browser page?

print qq~
<SCRIPT type="text/javascript">
<!--
document.title="$config{'sitename'} NEED HELP WITH THIS PART-->$category{$form{'category'}}";
// -->
</SCRIPT>
~;


THANK YOU VERY MUCH FOR ALL YOUR HELP!
shnippy


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
Richardadmin click here to view user rating
Charter Member
1987 posts, 10 feedbacks, 19 points
Nov-01-09, 04:09 PM (CST)
Click to view user profileClick to add this user to your buddy list  
2. "RE: Change duplicate category titles"
 
   The needed coding is attached in the link below, but it will display the categories something like this
Fakesitename -> Antique -> Furniture
if you want to remove the -> then in the coding find this line:

$disppath .= "$supercat{$1} -> ";

then replace it with this line:

$disppath .= "$supercat{$1} ";

Attachments
http://www.usanetcreations.com/dcforum/User_files/4aedf8e07d2d76ba.txt

  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
Len click here to view user rating
Member since May-4-04
477 posts, 6 feedbacks, 10 points
Jan-23-11, 06:04 AM (CST)
Click to view user profileClick to add this user to your buddy list  
3. "RE: Change duplicate category titles"
 
   Hi Richard and Snippy
I've just found this post
and would like to add it to my site.

Question: where do I place the code?

Many thanks for any help!
Best Regards
Len


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
Len click here to view user rating
Member since May-4-04
477 posts, 6 feedbacks, 10 points
Jan-23-11, 06:06 AM (CST)
Click to view user profileClick to add this user to your buddy list  
4. "RE: Change duplicate category titles"
 
   sorry shnippy
I missed the h in your user name
it's a shame we can't edit our posts.


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
Homermoderator
Member since Jan-10-08
207 posts, Rate this user
Jan-23-11, 11:07 AM (CST)
Click to view user profileClick to add this user to your buddy list  
5. "RE: Change duplicate category titles"
 
   @Len

put the script somewhere in the top of the sub where you want to use it, about after the last "oops" line as shown in the example below.

It then will display individual titles for each page called.

By example, I have added a similar routine into my dispitem sub to display the individual item title as Page title.

You just have to adjust

document.title="...............";

to whatever you want to display, in your case probably the Category or Subcategory title., but this already has been displayed on Richard's solution.

For the dispitem. pl, it would look like:

document.title="$config{'sitename'}: $title";

-----------

&oops("Item $form{'item'} could not be opened. If this item is closed, you can view statistics and bid history using our <a href=$ENV{'SCRIPT_NAME'}\?action=closed>closed item viewer</A>.") if $title eq '';

#-#### Page Title Script
print qq~
<SCRIPT type="text/javascript">
<!--
document.title="$config{'sitename'}: $title";
// -->
</SCRIPT>
~;
#-#### END Page Title Script
----------

Good luck

Homer

If you don't know where you're going, any road will get you there.


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote
Len click here to view user rating
Member since May-4-04
477 posts, 6 feedbacks, 10 points
Jan-23-11, 11:27 AM (CST)
Click to view user profileClick to add this user to your buddy list  
6. "RE: Change duplicate category titles"
 
   Hi Homer
Many thanks for your help Mate,
it's much appreciated!


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote


Conferences | Topics | Previous Topic | Next Topic
Rate this topic Rate this topic