Hey Allister!  Welcome to BoltWire

You shouldn't have any trouble with these kinds of things in BoltWire.
I'd suggest you look at the store plugin and the infotags plugin.
Those are similar to what you are wanting I think. Though not exactly.
Just a starting point for ideas.

More below...

On Sat, May 16, 2009 at 8:00 PM, Allister Jenks <[email protected]> wrote:
> Hi all,
>
> I'm about to embark on a serious amount of effort to roll out my first
> BoltWire site. The content currently exists as heavily-PHP-supported pages
> on a PmWiki site and I am looking forward to hopefully using no code of my
> own with Boltwire.  :-)

Everything below should be doable easily with the core BoltWire code.

> But I would like some initial guidance on the structures and features that
> are best to use. I'll figure out the detail as I go.
>
> I have a few hundred products which all have certain attributes including an
> item number, name, price and size. The products do not need to be viewed
> individually, only on 'category' pages. So I am thinking of some form of
> data store - be it one or many pages - to hold these attributes, including
> multiple categories in which each belongs, and then automatically generated
> lists based on these categories as the main pages of the site. Then to add a
> new product (assuming only existing categories) it would be a simple task of
> adding the product data and everything else would take care of itself. One
> twist is that there is also a product image for each which would need to
> appear on the category pages.
>
> The key questions are:
>
> 1) How to store the data?

Basically on each item page, you will store it as data variables. The
categories will probably go much faster if you store them as infovars.
 Here's the low down:

1) Create a page called action.storeitem with content like this:

[if equal {p1} item]
[form]
name: [text title "{:title}"]
price: [text price "{:price}"]
size: [text size "{:size}"]
categories: [text categories "{info.categories::{p}}"]
description:
[box content][(source {p})][box]
[submit]
[session savedata name,price,size]
[session edit {=content}]
[session info "field={p} value='{=categories}' target=info.categories"]
[form]
[else]
<(search group=item template=[[{+p}&action=storeitem|{+:name}]])>
[if]

2) Put this on item.footer:

[if admin][[{p}&action=storeitem|EDIT]][if]

To create a new item, just create a blank page item.1231231

> 2) How to deal with multiple categories?

3) Put this on categories.header (or footer).

[(search group=item if="inlist {p2} {info.categories::{+p}}" template="title")]

This will generate a list of all the pages that have the category.
Note your categories should be saved as a csv list, if there are more
than one, like
cars,clothes,food. You will also want to create a custom template
based on how you want to display the pages.  You will want to also

4) Create a blank page for each category (categories.car,
categories.clothes).  To generate a list of all available categories,
just do [(search group=categories)]

> 3) How to deal with the images?

You should just be able to do img:{p2}.jpg  or [^{p2}.gif^] if you
need to add speciall attributes etc. This assumes the page is
item.1234213.  You can manually ftp all your images up to the files
folder in your field.

> Note that the image files are all named by the item number.

This is just all right off the cuff, not tested, but it should get you
started. And introduce the syntax a bit. Let me know if it glitches.
I'm sure there's got to be one or two somewhere.

Cheers,
Dan

P.S. There are probably lot's of other ways to do this. I think you'll
find BoltWire extremely flexible, and quite robust.  Enjoy!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to