Home : Products : Links 2.0 : Discussions :

Products: Links 2.0: Discussions: Re: [MarkBT] Copy a whole Category: Edit Log

Here is the list of edits for this post
Re: [MarkBT] Copy a whole Category
Use a text editor (wordpad, textpad, etc) and create the structure you need, with the city name variable to be replaced in the next step:

city_name/category/subcategory_1
city_name/category/subcategory_2

Use this as a template, copy and paste it, then use search/replace to change each city name as you go:

search for: city_name
replace with: Phoenix

Your list will grow like so:

Phoenix/category/subcategory_1
Phoenix/category/subcategory_2
Tucson/category/subcategory_1
Tucson/category/subcategory_2
city_name/category/subcategory_1
city_name/category/subcategory_2

Be sure to save your work as you go! Now you need to get this info into the categories.db file. The default fields are:

ID, Name, Description, Related, Meta Description, Meta Keywords, Header, and Footer.

So you will have lines like:

25|Phoenix/category/subcategory_1||||||
26|Phoenix/category/subcategory_2||||||
27|Phoenix/category/subcategory_3||||||

This assumes no entries in the other fields. Only the first two fields are required. Once you have the list of categories, you can go through and add the numbers to the beginning, then use search/replace again to add the empty fields to the end:

search for: subcategory_1
replace with: subcategory_1||||||

Once it's all done, just copy it directly into the categories.db. Remember also to update the categories.txt (a number). There may be an easier way to do it, but this will work.


Leonard
aka PerlFlunkie

Last edited by:

PerlFlunkie: Dec 28, 2005, 9:29 PM

Edit Log: