Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Interchange: users

Internal bounce

 

 

Interchange users RSS feed   Index | Next | Previous | View Threaded


bill at bottlenose-wine

Apr 17, 2008, 2:17 PM

Post #1 of 8 (306 views)
Permalink
Internal bounce

Hi,

I don't know what or how to call this.

I would like to do something similar to the [bounce] tag without
issuing a redirect to the client. I would like to just say, "Hey
Interchange start over with this other page instead and give that over
to the client." Is there a way to do that? I'm trying to make search
engine friendly URLs.

Is there a way in interchange to have a URL like /product/yellow-tail-
shiraz and then have a page called 'product' that knows about 'yellow-
tail-shiraz' and can do what it needs to do?


Bill Carr
bill[at]bottlenose-wine.com




_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


richard at endpoint

Apr 17, 2008, 2:31 PM

Post #2 of 8 (297 views)
Permalink
Re: Internal bounce [In reply to]

Bill Carr wrote:
> Hi,
>
> I don't know what or how to call this.
>
> I would like to do something similar to the [bounce] tag without
> issuing a redirect to the client. I would like to just say, "Hey
> Interchange start over with this other page instead and give that over
> to the client." Is there a way to do that? I'm trying to make search
> engine friendly URLs.
>
> Is there a way in interchange to have a URL like /product/yellow-tail-
> shiraz and then have a page called 'product' that knows about 'yellow-
> tail-shiraz' and can do what it needs to do?
>
>
> Bill Carr
> bill[at]bottlenose-wine.com
>
>
>

It sounds like what you are looking for would be ActionMaps which allow
you to map an action to a page. It also allows you to setup CGI or
Scratch variables that help the page know what to display.

http://www.interchange.rtfm.info/icdocs/config/ActionMap.html

--

Richard Templet
End Point Corp.





_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


brian at endpoint

Apr 17, 2008, 2:31 PM

Post #3 of 8 (294 views)
Permalink
Re: Internal bounce [In reply to]

Bill Carr wrote:
> Hi,
>
> I don't know what or how to call this.
>
> I would like to do something similar to the [bounce] tag without
> issuing a redirect to the client. I would like to just say, "Hey
> Interchange start over with this other page instead and give that over
> to the client." Is there a way to do that? I'm trying to make search
> engine friendly URLs.
>
> Is there a way in interchange to have a URL like /product/yellow-tail-
> shiraz and then have a page called 'product' that knows about 'yellow-
> tail-shiraz' and can do what it needs to do?
>
>
> Bill Carr
> bill[at]bottlenose-wine.com

Sounds like an Action Map to me.

http://www.icdevgroup.org/xmldocs/confs/ActionMap.html

--
Brian J. Miller
End Point Corp.
brian[at]endpoint.com

_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


ron at endpoint

Apr 17, 2008, 2:32 PM

Post #4 of 8 (293 views)
Permalink
Re: Internal bounce [In reply to]

Bill Carr wrote:
> Hi,
>
> I don't know what or how to call this.
>
> I would like to do something similar to the [bounce] tag without
> issuing a redirect to the client. I would like to just say, "Hey
> Interchange start over with this other page instead and give that over
> to the client." Is there a way to do that? I'm trying to make search
> engine friendly URLs.
>
> Is there a way in interchange to have a URL like /product/yellow-tail-
> shiraz and then have a page called 'product' that knows about 'yellow-
> tail-shiraz' and can do what it needs to do?
>
>
> Bill Carr
> bill[at]bottlenose-wine.com
>
>
>

Hi Bill,

If I understand correctly in your scenario you would have the page "product" look up the sku yellow-tail-shiraz and then redirect to the flypage for that product? It sounds like a perfect use of ActionMaps. With an ActionMap named "product", you can look at the rest of the URL, figure out which product is being pulled up and then set mv_nextpage to your product page and set cgi variables which will be used on that product page to show the product. Here is an example:

CodeDef products ActionMap
CodeDef products Routine <<EOR
sub {
my ($param1, $param2) = split ('/', shift);

$CGI->{mv_nextpage} = 'flypage';
$CGI->{sku} = $param1;
return 1;
}
EOR

On the flypage you would then use the cgi variable sku to pass to the fly-list tag. A url for such a product could then look something like this:

http://www.site.com/products/s23451/yellow-tail-shiraz.html

If you don't want to use the sku in the url then you'll need to take the "yellow-tail-shiraz" and use it to look up in the database the sku of that item.

It might be helpful to write a help usertag as well which takes in a sku and outputs the url. You can then use that tag throughout the site to link to different products.

--
Ron Phipps
End Point Corporation
ron[at]endpoint.com

_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


bill at worldwideimpact

Apr 17, 2008, 3:21 PM

Post #5 of 8 (295 views)
Permalink
Re: Internal bounce [In reply to]

On Apr 17, 2008, at 5:31 PM, Brian J. Miller wrote:

> Bill Carr wrote:
>> Hi,
>>
>> I don't know what or how to call this.
>>
>> I would like to do something similar to the [bounce] tag without
>> issuing a redirect to the client. I would like to just say, "Hey
>> Interchange start over with this other page instead and give that
>> over
>> to the client." Is there a way to do that? I'm trying to make search
>> engine friendly URLs.
>>
>> Is there a way in interchange to have a URL like /product/yellow-
>> tail-
>> shiraz and then have a page called 'product' that knows about
>> 'yellow-
>> tail-shiraz' and can do what it needs to do?
>>
>>
>> Bill Carr
>> bill[at]bottlenose-wine.com
>
> Sounds like an Action Map to me.
>
> http://www.icdevgroup.org/xmldocs/confs/ActionMap.html
Thanks for the responses. ActionMap is what I need. I did not know
about it.

Bill Carr
bill[at]worldwideimpact.com



_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


jordan at gishnetwork

Apr 17, 2008, 3:26 PM

Post #6 of 8 (294 views)
Permalink
Re: Internal bounce [In reply to]

> users-bounces[at]icdevgroup.org] On Behalf Of Brian J. Miller
> Bill Carr wrote:
> > Hi,
> >
> > I don't know what or how to call this.
> >
> > I would like to do something similar to the [bounce] tag without
> > issuing a redirect to the client. I would like to just say, "Hey
> > Interchange start over with this other page instead and give that
> over
> > to the client." Is there a way to do that? I'm trying to make search
> > engine friendly URLs.
> >
> > Is there a way in interchange to have a URL like /product/yellow-
> tail-
> > shiraz and then have a page called 'product' that knows about
> 'yellow-
> > tail-shiraz' and can do what it needs to do?
> >
> >
> > Bill Carr
> > bill[at]bottlenose-wine.com
>
> Sounds like an Action Map to me.
>
> http://www.icdevgroup.org/xmldocs/confs/ActionMap.html
>
> --
> Brian J. Miller


hmmm, I'd still be interested to know what someone from End Point would
say....

8-)

Paul


_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


lists at gmnet

Apr 17, 2008, 3:55 PM

Post #7 of 8 (294 views)
Permalink
Re: Internal bounce [In reply to]

On Thu, 2008-04-17 at 17:17 -0400, Bill Carr wrote:
> Hi,
>
> I don't know what or how to call this.
>
> I would like to do something similar to the [bounce] tag without
> issuing a redirect to the client. I would like to just say, "Hey
> Interchange start over with this other page instead and give that over
> to the client." Is there a way to do that? I'm trying to make search
> engine friendly URLs.
>
> Is there a way in interchange to have a URL like /product/yellow-tail-
> shiraz and then have a page called 'product' that knows about 'yellow-
> tail-shiraz' and can do what it needs to do?
>
>
> Bill Carr
> bill[at]bottlenose-wine.com
>
>

Yes, ActionMaps are key, Also I use them in combo with apache
mod-rewrite. this makes it so I can just use http://domain.com/item.html
or http://domain.com/category.html without the
cgi/catname/whatever.html

rick






_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users


ethan at endpoint

Apr 17, 2008, 9:30 PM

Post #8 of 8 (287 views)
Permalink
Re: Internal bounce [In reply to]

Paul Jordan wrote:
>> users-bounces[at]icdevgroup.org] On Behalf Of Brian J. Miller
>> Bill Carr wrote:
>>
>>> Hi,
>>>
>>> I don't know what or how to call this.
>>>
>>> I would like to do something similar to the [bounce] tag without
>>> issuing a redirect to the client. I would like to just say, "Hey
>>> Interchange start over with this other page instead and give that
>>>
>> over
>>
>>> to the client." Is there a way to do that? I'm trying to make search
>>> engine friendly URLs.
>>>
>>> Is there a way in interchange to have a URL like /product/yellow-
>>>
>> tail-
>>
>>> shiraz and then have a page called 'product' that knows about
>>>
>> 'yellow-
>>
>>> tail-shiraz' and can do what it needs to do?
>>>
>>>
>>> Bill Carr
>>> bill[at]bottlenose-wine.com
>>>
>> Sounds like an Action Map to me.
>>
>> http://www.icdevgroup.org/xmldocs/confs/ActionMap.html
>>
>> --
>> Brian J. Miller
>>
>
>
> hmmm, I'd still be interested to know what someone from End Point would
> say....
>
> 8-)
>
> Paul
>

I'm going to go out on a limb and say "actionmap".

It should be mentioned that if you use a global (Interchange-level)
actionmap rather than a catalog level one (or a global sub registered as
a catalog-level actionmap), you can tell the dispatch routine to
actually redo the actionmap phase. This can be handy. It can also be
dangerous and lead to infinite loops if you're not careful. Anyway, to
engage in this delightfulness, do the following in your actionmap code
if rerunning is desirable:

$Vend::FinalPath = 'new/catalog-relative/path/to/parse';
$Vend::RedoAction = 1;


This isn't typically useful, unless you use actionmaps all over the
place (which I have, encourage, and rigorously applaud).

Actionmaps are a marvelous way of achieving MVC-style separation of
concerns: put your business logic in 'em, and then have your template
pages and the ITL therein be strictly about presentation concerns.

Take it a step farther, and put all your actionmap routines in a custom
Perl module. Now you can have them call each other and have your
business logic be internally reusable, clean, etc. Depending on the
design of the routines, you could presumably validate some subset of
them with unit tests. Unit tests!

They are also nice for SEO.

They are also nice for RESTful design, since they let you craft URLs
where parameters are expressed as part of the URI path (instead of
GET/POST variables with an opaque path like "process" -- which is also
an actionmap).

If you get into using actionmaps, it is helpful to implement
routines/usertags that generate actionmap URL paths for you based on the
parameters you want passed to the actionmap. If you don't do this, then
you end up scattering the logic for building such URLs all over your
app. Which is !$cool.

By the way, people at End Point like actionmaps. In case you were
wondering.

Thanks.
- Ethan

--
Ethan Rowe
End Point Corporation
ethan[at]endpoint.com


_______________________________________________
interchange-users mailing list
interchange-users[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users

Interchange users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.