[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] feasibility of random components - [SOLVED]
Why didn't you just use the banner tag? It works basicly the same way, but would
give you, more likely, even more options...
John Beima
jbeima@palb.com, support@alocalagent.com, and support@alocalchurch.com
P.A.L.B. Systems - Phone: (780)451-1086 - Fax: (780)447-4760
11639-122 Street, Edmonton, Alberta, Canada, T5M 0B6
Affordable Web Pages - Phone: (888)932-9990 - Fax: (256)351-7297
2713B Spring Place SW, Decatur, Alabama, United States, 35603
Quoting Aaron Hazelton <aaronmail@hazenet.net>:
> > > I need some input on this idea, to see if it would even be
> > feasible, and
> > > perhaps more importantly, (somewhat) simple to do. Maybe
> > someone has
> > > done this or has another solution.
> > >
> > > Im thinking about having components on some pages be random. -- One
> > > time you visit this page, it might show specials, the next time you
> > > visit it might show "tips" or "testimonials" components or whatever
> > > else. Here's my idea on maybe how to do it:
> > >
> > > = put the "random" component in each page you want this done in.
> >
> >
> >
> > Hi, Ed Lafrance just helped me out with something similar. We
> > made a table
> > called list.txt, and in that, made a table of "includes" like:
> >
> > include
> > file1.txt
> > file2.txt
> > file3.txt
> >
> > Then in a page you can:
> >
> > [loop
> > random=1
> > search="
> > fi=list
> > st=db
> > ra=yes
> > ml=1000
> > "
> > ]
> > here is the randon result:<br>
> > [include file="path/to/random_file/dir/[loop-code]"]
> > [/loop]
> >
> > In that directory, just put file1.txt, file2.txt....... These
> > txt files
> > would include the html that you want to "include". I suppose
> > that this html
> > could have a component, like specials.
> >
> > ...I suppose.
> >
> >
> > Paul
> >
> Thanks Paul and thanks Ed! For those interested, here's what I did, and
> its working perfect:
>
> Set up NEW table called "rand_comp" like this
>
> Code | include
> --------------------
> 00001 feature1
> 00002 feature2
> 00003 testimonial
> Etc.................
>
> Set up component: "random_component"
> [loop
> random=1
> search="
> fi=rand_comp
> st=db
> ra=yes
> ml=1000
> rf=code,include
> "]
>
> [include file="templates/components/[loop-param include]"]
> [/loop]
>
> Insert "random_component" into pages...
>
> Isn't Interchange cool!?!...
>
> _____
>
> Sincerely,
> Aaron Hazelton
> >>Hazenet<<
> aaron@hazenet.net
>
>
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/