You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "Vince M. Clark" <vc...@globalera.com> on 2007/11/08 05:02:55 UTC

CMS Path Alias

In Content Manager it is possible to define a "Path Alias" for a piece of content. How is this used. For example, can the alias be used in URL's in eCommerce? There is a field called "map key." I have seen this used elsewhere in CMS to refer to the content in Freemarker. What is the purpose of map key in a path alias? 

Vince Clark 
Global Era 
The Freedom of Open Source 
vclark@globalera.com 
(303) 493-6723 

Re: unsubscribe

Posted by Adrian Crum <ad...@hlmksw.com>.
http://docs.ofbiz.org/display/OFBADMIN/Mailing+Lists

Steven Williamson wrote:

> unsubscribe
> 
> 


unsubscribe

Posted by Steven Williamson <st...@gmail.com>.
unsubscribe


Re: CMS Path Alias

Posted by Al Byers <by...@automationgroups.com>.
On 11/8/07, Vince M. Clark <vc...@globalera.com> wrote:
>
> Interesting. So would it be possible to add this to a controller.xml in
> our custom component, run all requests thru cms first to try and match the
> content alias, and then run thru standard controller? This would avoid
> having to use an extra "directory" in the url like "cms."
>
> Alternatively, we must use "cms" to identify the controller to run the
> request thru. Would it be as simple as adding this content related
> default-request and request-map to the controller.xml in our custom
> component? Then it would always look for a path alias on a content record
> and return that content?


Yes, I think it would  work just by defining the "cms" request in your
controller.
-Al

Vince Clark
> Global Era
> The Freedom of Open Source
> vclark@globalera.com
> (303) 493-6723
>
> ----- Original Message -----
> From: "Al Byers" <by...@automationgroups.com>
> To: user@ofbiz.apache.org
> Sent: Thursday, November 8, 2007 4:28:17 PM (GMT-0700) America/Denver
> Subject: Re: CMS Path Alias
>
> Vince,
>
> Look at the specialpurpose cmssite.
> In controller.xml you will see:
> <default-request request-uri="cms"/>
>
> That is the request that you must call. You will see that it calls a
> org.ofbiz.content.cms.CmsEvents.cms method.
>
> I think this cmssite app should help you.
>
> BTW, what does SEO stand for?
>
> -Al
>
> On 11/8/07, Vince M. Clark <vc...@globalera.com> wrote:
> >
> > Thanks Al. So are you saying that if I use the syntax:
> > "/<contentId>" I should be able to use the alias instead of an actual
> > content id? If so, what would come before the slash to identify the
> > reference as content. Something like:
> > "content/<contentalias>"
> >
> > The reason we are trying to use this is to make URL's more SEO friendly.
> >
> > Vince Clark
> > Global Era
> > The Freedom of Open Source
> > vclark@globalera.com
> > (303) 493-6723
> >
> > ----- Original Message -----
> > From: "Al Byers" <by...@automationgroups.com>
> > To: user@ofbiz.apache.org
> > Sent: Thursday, November 8, 2007 12:08:31 PM (GMT-0700) America/Denver
> > Subject: Re: CMS Path Alias
> >
> > Vince,
> >
> > I have worked with the path alias a little bit. It is something that
> > Andrew
> > added to make the CMS one step closer to mainstream functionality. It is
> > used in the CmsEvents class. The idea is that the url would have a
> > "/<contentId>" at the end and it would display that content. I think the
> > pathalias is just a way to put a more intuitive value for <contentId>.
> > There
> > is a much better explanation than that and hopefully you will get one. I
> > have not found it useful, but that is probably because I don't
> understand
> > its full potential.
> >
> > The "mapKey" is an important attribute for relating subcontent to a
> parent
> > content via the ContentAssoc entity. The idea is that you may have a
> > newspaper-like screen layout with sections named "main", "leftsidebar",
> > etc.
> > The mainpage would have a static contentId and there would be multiple
> > subcontents linking to the "main" section via the mapKey value in
> > ContentAssoc. The page would display the one that is current using the
> > ContentAssoc.from/thruDate fields.
> >
> > -Al
> >
> > On 11/7/07, Vince M. Clark <vc...@globalera.com> wrote:
> > >
> > > In Content Manager it is possible to define a "Path Alias" for a piece
> > of
> > > content. How is this used. For example, can the alias be used in URL's
> > in
> > > eCommerce? There is a field called "map key." I have seen this used
> > > elsewhere in CMS to refer to the content in Freemarker. What is the
> > purpose
> > > of map key in a path alias?
> > >
> > > Vince Clark
> > > Global Era
> > > The Freedom of Open Source
> > > vclark@globalera.com
> > > (303) 493-6723
> > >
> >
>

Re: CMS Path Alias

Posted by "Vince M. Clark" <vc...@globalera.com>.
Interesting. So would it be possible to add this to a controller.xml in our custom component, run all requests thru cms first to try and match the content alias, and then run thru standard controller? This would avoid having to use an extra "directory" in the url like "cms." 

Alternatively, we must use "cms" to identify the controller to run the request thru. Would it be as simple as adding this content related default-request and request-map to the controller.xml in our custom component? Then it would always look for a path alias on a content record and return that content? 

Vince Clark 
Global Era 
The Freedom of Open Source 
vclark@globalera.com 
(303) 493-6723 

----- Original Message ----- 
From: "Al Byers" <by...@automationgroups.com> 
To: user@ofbiz.apache.org 
Sent: Thursday, November 8, 2007 4:28:17 PM (GMT-0700) America/Denver 
Subject: Re: CMS Path Alias 

Vince, 

Look at the specialpurpose cmssite. 
In controller.xml you will see: 
<default-request request-uri="cms"/> 

That is the request that you must call. You will see that it calls a 
org.ofbiz.content.cms.CmsEvents.cms method. 

I think this cmssite app should help you. 

BTW, what does SEO stand for? 

-Al 

On 11/8/07, Vince M. Clark <vc...@globalera.com> wrote: 
> 
> Thanks Al. So are you saying that if I use the syntax: 
> "/<contentId>" I should be able to use the alias instead of an actual 
> content id? If so, what would come before the slash to identify the 
> reference as content. Something like: 
> "content/<contentalias>" 
> 
> The reason we are trying to use this is to make URL's more SEO friendly. 
> 
> Vince Clark 
> Global Era 
> The Freedom of Open Source 
> vclark@globalera.com 
> (303) 493-6723 
> 
> ----- Original Message ----- 
> From: "Al Byers" <by...@automationgroups.com> 
> To: user@ofbiz.apache.org 
> Sent: Thursday, November 8, 2007 12:08:31 PM (GMT-0700) America/Denver 
> Subject: Re: CMS Path Alias 
> 
> Vince, 
> 
> I have worked with the path alias a little bit. It is something that 
> Andrew 
> added to make the CMS one step closer to mainstream functionality. It is 
> used in the CmsEvents class. The idea is that the url would have a 
> "/<contentId>" at the end and it would display that content. I think the 
> pathalias is just a way to put a more intuitive value for <contentId>. 
> There 
> is a much better explanation than that and hopefully you will get one. I 
> have not found it useful, but that is probably because I don't understand 
> its full potential. 
> 
> The "mapKey" is an important attribute for relating subcontent to a parent 
> content via the ContentAssoc entity. The idea is that you may have a 
> newspaper-like screen layout with sections named "main", "leftsidebar", 
> etc. 
> The mainpage would have a static contentId and there would be multiple 
> subcontents linking to the "main" section via the mapKey value in 
> ContentAssoc. The page would display the one that is current using the 
> ContentAssoc.from/thruDate fields. 
> 
> -Al 
> 
> On 11/7/07, Vince M. Clark <vc...@globalera.com> wrote: 
> > 
> > In Content Manager it is possible to define a "Path Alias" for a piece 
> of 
> > content. How is this used. For example, can the alias be used in URL's 
> in 
> > eCommerce? There is a field called "map key." I have seen this used 
> > elsewhere in CMS to refer to the content in Freemarker. What is the 
> purpose 
> > of map key in a path alias? 
> > 
> > Vince Clark 
> > Global Era 
> > The Freedom of Open Source 
> > vclark@globalera.com 
> > (303) 493-6723 
> > 
> 

Re: CMS Path Alias

Posted by "Vince M. Clark" <vc...@globalera.com>.
Search Engine Optimization. 

Vince Clark 
Global Era 
The Freedom of Open Source 
vclark@globalera.com 
(303) 493-6723 

----- Original Message ----- 
From: "Al Byers" <by...@automationgroups.com> 
To: user@ofbiz.apache.org 
Sent: Thursday, November 8, 2007 4:28:17 PM (GMT-0700) America/Denver 
Subject: Re: CMS Path Alias 

Vince, 

Look at the specialpurpose cmssite. 
In controller.xml you will see: 
<default-request request-uri="cms"/> 

That is the request that you must call. You will see that it calls a 
org.ofbiz.content.cms.CmsEvents.cms method. 

I think this cmssite app should help you. 

BTW, what does SEO stand for? 

-Al 

On 11/8/07, Vince M. Clark <vc...@globalera.com> wrote: 
> 
> Thanks Al. So are you saying that if I use the syntax: 
> "/<contentId>" I should be able to use the alias instead of an actual 
> content id? If so, what would come before the slash to identify the 
> reference as content. Something like: 
> "content/<contentalias>" 
> 
> The reason we are trying to use this is to make URL's more SEO friendly. 
> 
> Vince Clark 
> Global Era 
> The Freedom of Open Source 
> vclark@globalera.com 
> (303) 493-6723 
> 
> ----- Original Message ----- 
> From: "Al Byers" <by...@automationgroups.com> 
> To: user@ofbiz.apache.org 
> Sent: Thursday, November 8, 2007 12:08:31 PM (GMT-0700) America/Denver 
> Subject: Re: CMS Path Alias 
> 
> Vince, 
> 
> I have worked with the path alias a little bit. It is something that 
> Andrew 
> added to make the CMS one step closer to mainstream functionality. It is 
> used in the CmsEvents class. The idea is that the url would have a 
> "/<contentId>" at the end and it would display that content. I think the 
> pathalias is just a way to put a more intuitive value for <contentId>. 
> There 
> is a much better explanation than that and hopefully you will get one. I 
> have not found it useful, but that is probably because I don't understand 
> its full potential. 
> 
> The "mapKey" is an important attribute for relating subcontent to a parent 
> content via the ContentAssoc entity. The idea is that you may have a 
> newspaper-like screen layout with sections named "main", "leftsidebar", 
> etc. 
> The mainpage would have a static contentId and there would be multiple 
> subcontents linking to the "main" section via the mapKey value in 
> ContentAssoc. The page would display the one that is current using the 
> ContentAssoc.from/thruDate fields. 
> 
> -Al 
> 
> On 11/7/07, Vince M. Clark <vc...@globalera.com> wrote: 
> > 
> > In Content Manager it is possible to define a "Path Alias" for a piece 
> of 
> > content. How is this used. For example, can the alias be used in URL's 
> in 
> > eCommerce? There is a field called "map key." I have seen this used 
> > elsewhere in CMS to refer to the content in Freemarker. What is the 
> purpose 
> > of map key in a path alias? 
> > 
> > Vince Clark 
> > Global Era 
> > The Freedom of Open Source 
> > vclark@globalera.com 
> > (303) 493-6723 
> > 
> 

Re: CMS Path Alias

Posted by Al Byers <by...@automationgroups.com>.
Vince,

Look at the specialpurpose cmssite.
In controller.xml you will see:
    <default-request request-uri="cms"/>

That is the request that you must call. You will see that it calls a
org.ofbiz.content.cms.CmsEvents.cms method.

I think this cmssite app should help you.

BTW, what does SEO stand for?

-Al

On 11/8/07, Vince M. Clark <vc...@globalera.com> wrote:
>
> Thanks Al. So are you saying that if I use the syntax:
> "/<contentId>" I should be able to use the alias instead of an actual
> content id? If so, what would come before the slash to identify the
> reference as content. Something like:
> "content/<contentalias>"
>
> The reason we are trying to use this is to make URL's more SEO friendly.
>
> Vince Clark
> Global Era
> The Freedom of Open Source
> vclark@globalera.com
> (303) 493-6723
>
> ----- Original Message -----
> From: "Al Byers" <by...@automationgroups.com>
> To: user@ofbiz.apache.org
> Sent: Thursday, November 8, 2007 12:08:31 PM (GMT-0700) America/Denver
> Subject: Re: CMS Path Alias
>
> Vince,
>
> I have worked with the path alias a little bit. It is something that
> Andrew
> added to make the CMS one step closer to mainstream functionality. It is
> used in the CmsEvents class. The idea is that the url would have a
> "/<contentId>" at the end and it would display that content. I think the
> pathalias is just a way to put a more intuitive value for <contentId>.
> There
> is a much better explanation than that and hopefully you will get one. I
> have not found it useful, but that is probably because I don't understand
> its full potential.
>
> The "mapKey" is an important attribute for relating subcontent to a parent
> content via the ContentAssoc entity. The idea is that you may have a
> newspaper-like screen layout with sections named "main", "leftsidebar",
> etc.
> The mainpage would have a static contentId and there would be multiple
> subcontents linking to the "main" section via the mapKey value in
> ContentAssoc. The page would display the one that is current using the
> ContentAssoc.from/thruDate fields.
>
> -Al
>
> On 11/7/07, Vince M. Clark <vc...@globalera.com> wrote:
> >
> > In Content Manager it is possible to define a "Path Alias" for a piece
> of
> > content. How is this used. For example, can the alias be used in URL's
> in
> > eCommerce? There is a field called "map key." I have seen this used
> > elsewhere in CMS to refer to the content in Freemarker. What is the
> purpose
> > of map key in a path alias?
> >
> > Vince Clark
> > Global Era
> > The Freedom of Open Source
> > vclark@globalera.com
> > (303) 493-6723
> >
>

Re: CMS Path Alias

Posted by "Vince M. Clark" <vc...@globalera.com>.
Thanks Al. So are you saying that if I use the syntax: 
"/<contentId>" I should be able to use the alias instead of an actual content id? If so, what would come before the slash to identify the reference as content. Something like: 
"content/<contentalias>" 

The reason we are trying to use this is to make URL's more SEO friendly. 

Vince Clark 
Global Era 
The Freedom of Open Source 
vclark@globalera.com 
(303) 493-6723 

----- Original Message ----- 
From: "Al Byers" <by...@automationgroups.com> 
To: user@ofbiz.apache.org 
Sent: Thursday, November 8, 2007 12:08:31 PM (GMT-0700) America/Denver 
Subject: Re: CMS Path Alias 

Vince, 

I have worked with the path alias a little bit. It is something that Andrew 
added to make the CMS one step closer to mainstream functionality. It is 
used in the CmsEvents class. The idea is that the url would have a 
"/<contentId>" at the end and it would display that content. I think the 
pathalias is just a way to put a more intuitive value for <contentId>. There 
is a much better explanation than that and hopefully you will get one. I 
have not found it useful, but that is probably because I don't understand 
its full potential. 

The "mapKey" is an important attribute for relating subcontent to a parent 
content via the ContentAssoc entity. The idea is that you may have a 
newspaper-like screen layout with sections named "main", "leftsidebar", etc. 
The mainpage would have a static contentId and there would be multiple 
subcontents linking to the "main" section via the mapKey value in 
ContentAssoc. The page would display the one that is current using the 
ContentAssoc.from/thruDate fields. 

-Al 

On 11/7/07, Vince M. Clark <vc...@globalera.com> wrote: 
> 
> In Content Manager it is possible to define a "Path Alias" for a piece of 
> content. How is this used. For example, can the alias be used in URL's in 
> eCommerce? There is a field called "map key." I have seen this used 
> elsewhere in CMS to refer to the content in Freemarker. What is the purpose 
> of map key in a path alias? 
> 
> Vince Clark 
> Global Era 
> The Freedom of Open Source 
> vclark@globalera.com 
> (303) 493-6723 
> 

Re: CMS Path Alias

Posted by Al Byers <by...@automationgroups.com>.
Vince,

I have worked with the path alias a little bit. It is something that Andrew
added to make the CMS one step closer to mainstream functionality. It is
used in the CmsEvents class. The idea is that the url would have a
"/<contentId>" at the end and it would display that content. I think the
pathalias is just a way to put a more intuitive value for <contentId>. There
is a much better explanation than that and hopefully you will get one. I
have not found it useful, but that is probably because I don't understand
its full potential.

The "mapKey" is an important attribute for relating subcontent to a parent
content via the ContentAssoc entity. The idea is that you may have a
newspaper-like screen layout with sections named "main", "leftsidebar", etc.
The mainpage would have a static contentId and there would be multiple
subcontents linking to the "main" section via the mapKey value in
ContentAssoc. The page would display the one that is current using the
ContentAssoc.from/thruDate fields.

-Al

On 11/7/07, Vince M. Clark <vc...@globalera.com> wrote:
>
> In Content Manager it is possible to define a "Path Alias" for a piece of
> content. How is this used. For example, can the alias be used in URL's in
> eCommerce? There is a field called "map key." I have seen this used
> elsewhere in CMS to refer to the content in Freemarker. What is the purpose
> of map key in a path alias?
>
> Vince Clark
> Global Era
> The Freedom of Open Source
> vclark@globalera.com
> (303) 493-6723
>