[ic] which_page

Jim Balcom interchange-users@icdevgroup.org
Fri Oct 11 17:41:01 2002


Maybe I am the only one who didn't know this. If so, please move on to the
next message and accept my apologies.

Here is how I got 'which_page' to work under 4.6.3

My goal was to have the left hand side of the main page to only have main
categories.

TOOLS
SCREWS
NAILS
PAINT SUPPLIES

Then, when someone clicks on SCREWS they get taken to the SCREWS PAGE
(screws.html)
When they arrive there, the middle of the screen would contain some hype
about how great our screws are.

On the left side they would see:

TOOLS
SCREWS
  Flat Head
  Oval Head
  Phillips Head
NAILS
PAINT SUPPLIES

When they click on Flat Head the data base would be searched and the
standard results page brings up all of the flat head screws in the
inventory.

How I did this:

In index.html I put this:
[set page_class]main[/set]

In screws.html I put:
[set page_class]screws[/set]

OK, in area.txt there are several headers in that file:
code    sel     name    which_page      sort    display_type    image.......

Where you want the items for the SCREWS page to show up, you put 'screws'
under the 'which_page' heading.

You would have something like:
1110	left	TOOLS	   all		01	........
1111	left	SCREWS	   all		02	........
1112	left	NAILS	   all		03	........
1234	left	Flat Head  screws	01	........
1235	left	Oval Head  screws	02	........
1236	left	Phillips   screws	03	........
1310	left	Ball Peen  hammers	01	........
1320	left	Claw	   hammers	02	........

The first 3 items will show up on all pages.
The next 3 items will only show up on pages that have had 'which_page' set
as 'screws'. (You can have several pages named this.)

I suspect that you can combine 'which_page' specifications, either comma
separated or space separated, (I'm not sure which, I haven't tried.) so that
you could come up with something like:


TOOLS
SCREWS
  Flat Head
    Brass
    Steel
    Iron
  Oval Head
    Bronze
    Something
    Something else
  Phillips Head
NAILS
PAINT SUPPLIES

I went through all of the files and documentation today for 4.8, as well as
4.9 and grepped for page_class as well as which_page. I found a couple of
places where the software is checking to see if this page equals the page
for these categories, but otherwise there didn't seem to be much
information.

Now, here is another mystery: SEL It's always set to 'left'. What are the
other options? right, perhaps? If so, how does one get a page to display
something on the right side? Perhaps the place to select which type of
screwing that you are going to get?

This is all in AREA.TXT.
Closely tied to that is CAT.TXT.

The SEL in cat.txt is the same as CODE in area.txt. and will then determine
what is going to come under which headers. They both work together.

Pay attention to the 'sort' headers in both files. You can manually adjust
them to determine what order they appear in.

Please note that I adjust all of these from the command line in shell
access. I rarely use the GUI for administration.


OFF TOPIC::

A sniper is on the loose in this area around Washington, DC. 8 people have
been killed, so far. No one is immune. Black, white, male, female, kids going
to school, old people. Usually in a gas station, but not always. It's always
the same gun, and he usually has a white van - a Chevy Astro this morning.

Schools in this area are under 'lockdown'. Once the kids arrives at school
he is locked in all day, except for a very good reason. No outside
activities, no after school activities. Gome to school, get locked in,
learn, then get on the bus and go home.

Personally, I think that it is one of bin Laden's terrorist attacks. This
area - about a 100 mile diameter - is certainly terrorized. Will this strike
force move on to somewhere else? Chicago? Los Angeles? Denver? Be afraid!
VERY afraid!

-= Jim =-

                   .-.
                   /v\
                  // \\
                 /(   )\
                 ^^ - ^^
          > Phear the Penguin <
              L  I  N  U  X

----------------------------------------------------------------
Jim's Linux-Operated Underground Bomb Shelter

Tagline for Friday, October 11, 2002 at 16:45 PM:
Do not fumble with a woman's logic.

----------------------------------------------------------------
This Linux System has been up 22 hours

My web page: http://www.idk-enterprises.com
----------------------------------------------------------------