Can the document link picker in the template composer show the document names instead of the node name?

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

Can the document link picker in the template composer show the document names instead of the node name?

Bert Leunis
Hi all,

We noticed the following. When you work in the template composer with component properties, sometimes you can pick a document, using the DocumentLink. In the link picker the document names are shown and you can easily pick the document you want. In the properties box itself not the document name is shown but the node name (so "my-banner" instead of "My Banner").

Is it possible to show the document name there instead of the node name? What would we need to do if we needed to change this behavior in our current project?

We found info on this here [1]. We are on version 7.8.0.


With kind regards/Met vriendelijke groet,
Bert Leunis

Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Can the document link picker in the template composer show the document names instead of the node name?

Mathijs den Burger
Hi Bert,

On Fri, Jan 18, 2013 at 8:49 AM, Bert Leunis <[hidden email]> wrote:

We noticed the following. When you work in the template composer with component properties, sometimes you can pick a document, using the DocumentLink. In the link picker the document names are shown and you can easily pick the document you want. In the properties box itself not the document name is shown but the node name (so "my-banner" instead of "My Banner").

Is it possible to show the document name there instead of the node name?

Currently not.
 
What would we need to do if we needed to change this behavior in our current project?

In the 'cms' module of your project you would have to overlay your own version of these files (originals are located in the channel manager addon):
- org.onehippo.cms7.channelmanager.widgets.ExtLinkPicker.java
- org.onehippo.cms7.channelmanager.widgets.ExtLinkPicker.js 

The Java class currently returns the picked path of the node to the client-side. The Javascript widget then shows the last part of the path (i.e. the node name). The overlayed custom version would have to return the translated name of the node to the client-side too, which can then be shown in the widget instead of the node name. That should not be terribly hard to do. Could you create an improvement JIRA issue for it?

best,
Mathijs


_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: Can the document link picker in the template composer show the document names instead of the node name?

Frank van Lankvelt
In reply to this post by Bert Leunis
On Fri, Jan 18, 2013 at 8:49 AM, Bert Leunis <[hidden email]> wrote:

> Hi all,
>
> We noticed the following. When you work in the template composer with
> component properties, sometimes you can pick a document, using the
> DocumentLink. In the link picker the document names are shown and you can
> easily pick the document you want. In the properties box itself not the
> document name is shown but the node name (so "my-banner" instead of "My
> Banner").
>
> Is it possible to show the document name there instead of the node name?

that's not going to be easy.  The thing is, the value that's shown is
the value that's stored in the hst component properties.
To obtain the document name, it should either be passed along with the
value (a nested json object instead of a plain string?) or obtained
with an additional rest call.

cheers, Frank

> What would we need to do if we needed to change this behavior in our current
> project?
>
> We found info on this here [1]. We are on version 7.8.0.
>
> [1]
> http://www.onehippo.org/7_8/library/concepts/template-composer/template-composer-component-behavior.html
>
> With kind regards/Met vriendelijke groet,
> Bert Leunis
>
> Amsterdam - Oosteinde 11, 1017 WT Amsterdam
> Boston - 1 Broadway, Cambridge, MA 02142
>
> US +1 877 414 4776 (toll free)
> Europe +31(0)20 522 4466
> www.onehippo.com
>
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html