[jira] Created: (SLING-650) Support for vanity urls

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (SLING-650) Support for vanity urls

Robert Munteanu (Jira)
Support for vanity urls
-----------------------

                 Key: SLING-650
                 URL: https://issues.apache.org/jira/browse/SLING-650
             Project: Sling
          Issue Type: New Feature
          Components: JCR Resource
    Affects Versions: JCR Resource 2.0.2
            Reporter: Carsten Ziegeler
            Assignee: Carsten Ziegeler
             Fix For: JCR Resource 2.0.4


It would be nice to have support for vanity urls: these are urls that do not directly point to a resource. Instead it is possible to give a resource a "pretty" (vanity) url which can be used to address this resource.
Example:
/a/b/x/y/myPage
You can either address this by /a/b/x/y/myPage or by /products

This can be done by adding a new mixin: sling:VanityUrl
which has two properties: vanityUrl (which has in the example above the value /products)
and redirect which is a boolean indication if a redirect should be done or if the content should
be directly displayed.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Reply | Threaded
Open this post in threaded view
|

Re: [jira] Created: (SLING-650) Support for vanity urls

Bertrand Delacretaz
On Mon, Sep 8, 2008 at 11:58 AM, Carsten Ziegeler (JIRA)
<[hidden email]> wrote:

> ...This can be done by adding a new mixin: sling:VanityUrl
> which has two properties: vanityUrl (which has in the example above the value /products)
> and redirect which is a boolean indication if a redirect should be done or if the content should
> be directly displayed....

Could we also use this to select the resource to display when / is accessed?

Currently we're setting a redirect URL on the root node for this, but
there might be several candidates for /, maybe in a priority order:
display the Sling default homepage, unless there's an application
homepage that has more priority, unless a script has been created to
show a menu of homepages and has more priority, etc.

What you suggest sounds good for this, except that we might need an
additional "priority" property, to be able to resolve conflicts
without having to ask users.

WDYT?

-Bertrand

Reply | Threaded
Open this post in threaded view
|

Re: [jira] Created: (SLING-650) Support for vanity urls

Carsten Ziegeler
Bertrand Delacretaz wrote:
>
> Could we also use this to select the resource to display when / is accessed?
Yes, this should work for this case as well

>
> Currently we're setting a redirect URL on the root node for this, but
> there might be several candidates for /, maybe in a priority order:
> display the Sling default homepage, unless there's an application
> homepage that has more priority, unless a script has been created to
> show a menu of homepages and has more priority, etc.
>
> What you suggest sounds good for this, except that we might need an
> additional "priority" property, to be able to resolve conflicts
> without having to ask users.
>
Hmm, actually I've no real opinion here whether this is good or not.
Yes, we could add such a priority property - on the other hand if you
know that you have to set this property, you might also know that you
have to remove the url configuration from another node.

Carsten

--
Carsten Ziegeler
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [jira] Created: (SLING-650) Support for vanity urls

Bertrand Delacretaz
On Mon, Sep 8, 2008 at 1:59 PM, Carsten Ziegeler <[hidden email]> wrote:

> Bertrand Delacretaz wrote:
>> ...What you suggest sounds good for this, except that we might need an
>> additional "priority" property, to be able to resolve conflicts
>> without having to ask users.
>>
> Hmm, actually I've no real opinion here whether this is good or not.
> Yes, we could add such a priority property - on the other hand if you
> know that you have to set this property, you might also know that you
> have to remove the url configuration from another node....

The use case is:

-User starts with an "empty" Sling app -> gets default Sling homepage on /

-User loads a Sling-based application in the repository -> gets that
app's homepage on /, due to higher priority

-Use removes Sling-based app -> gets default Sling homepage again.

Using vanity URL priorities is not optimal, but it's useful in this
case and I'm not sure how to solve it otherwise.

-Bertrand

Reply | Threaded
Open this post in threaded view
|

Re: [jira] Created: (SLING-650) Support for vanity urls

Carsten Ziegeler
Bertrand Delacretaz wrote:

> On Mon, Sep 8, 2008 at 1:59 PM, Carsten Ziegeler <[hidden email]> wrote:
>
>> Bertrand Delacretaz wrote:
>>> ...What you suggest sounds good for this, except that we might need an
>>> additional "priority" property, to be able to resolve conflicts
>>> without having to ask users.
>>>
>> Hmm, actually I've no real opinion here whether this is good or not.
>> Yes, we could add such a priority property - on the other hand if you
>> know that you have to set this property, you might also know that you
>> have to remove the url configuration from another node....
>
> The use case is:
>
> -User starts with an "empty" Sling app -> gets default Sling homepage on /
>
> -User loads a Sling-based application in the repository -> gets that
> app's homepage on /, due to higher priority
>
> -Use removes Sling-based app -> gets default Sling homepage again.
>
> Using vanity URL priorities is not optimal, but it's useful in this
> case and I'm not sure how to solve it otherwise.
>
Yes, I see your point and adding the priority handling is easy as well,
it's just that I'm not sure about it :)

But yes, I'll add the priority handling and we can see how this works.

Carsten

--
Carsten Ziegeler
[hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SLING-650) Support for vanity urls

Robert Munteanu (Jira)
In reply to this post by Robert Munteanu (Jira)

     [ https://issues.apache.org/jira/browse/SLING-650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler updated SLING-650:
-----------------------------------

          Component/s: Servlets Get
    Affects Version/s: Servlets Get 2.0.2
        Fix Version/s: Servlets Get 2.0.4

> Support for vanity urls
> -----------------------
>
>                 Key: SLING-650
>                 URL: https://issues.apache.org/jira/browse/SLING-650
>             Project: Sling
>          Issue Type: New Feature
>          Components: JCR Resource, Servlets Get
>    Affects Versions: JCR Resource 2.0.2, Servlets Get 2.0.2
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: JCR Resource 2.0.4, Servlets Get 2.0.4
>
>
> It would be nice to have support for vanity urls: these are urls that do not directly point to a resource. Instead it is possible to give a resource a "pretty" (vanity) url which can be used to address this resource.
> Example:
> /a/b/x/y/myPage
> You can either address this by /a/b/x/y/myPage or by /products
> This can be done by adding a new mixin: sling:VanityUrl
> which has two properties: vanityUrl (which has in the example above the value /products)
> and redirect which is a boolean indication if a redirect should be done or if the content should
> be directly displayed.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (SLING-650) Support for vanity urls

Robert Munteanu (Jira)
In reply to this post by Robert Munteanu (Jira)

     [ https://issues.apache.org/jira/browse/SLING-650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler closed SLING-650.
----------------------------------

    Resolution: Fixed

Implemented with an additional priority field which is used if several resources use the same vanity url. The one with the highest priority is used then.

> Support for vanity urls
> -----------------------
>
>                 Key: SLING-650
>                 URL: https://issues.apache.org/jira/browse/SLING-650
>             Project: Sling
>          Issue Type: New Feature
>          Components: JCR Resource, Servlets Get
>    Affects Versions: JCR Resource 2.0.2, Servlets Get 2.0.2
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: JCR Resource 2.0.4, Servlets Get 2.0.4
>
>
> It would be nice to have support for vanity urls: these are urls that do not directly point to a resource. Instead it is possible to give a resource a "pretty" (vanity) url which can be used to address this resource.
> Example:
> /a/b/x/y/myPage
> You can either address this by /a/b/x/y/myPage or by /products
> This can be done by adding a new mixin: sling:VanityUrl
> which has two properties: vanityUrl (which has in the example above the value /products)
> and redirect which is a boolean indication if a redirect should be done or if the content should
> be directly displayed.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.