Share » Forums » General » Linking to objects using their alias...

Linking to objects using their alias in ezoe GUI

Linking to objects using their alias in ezoe GUI

Tuesday 14 September 2010 3:34:35 pm - 5 replies

Author Message

Gabriel Finkelstein

Tuesday 14 September 2010 4:32:39 pm

Why not just use Main/Folder2/your-page as the link?

I havent tried this, but maybe you could edit templates/content/datatype/view/ezxmltags/link.tpl and do:

$node = fetch(content, node, hash( node_path, $href ));

If a node matches, then find a way of getting its url aliases and use one that was created manually. If no node matches, just leave $href as the link. To find a node's url aliases you can make a template operator that searches the ezurlalias table.

Russell Michell

Tuesday 14 September 2010 6:54:06 pm

>Why not just use Main/Folder2/your-page as the link?

That's exactly it - you can't. You can link to the node_id or object_id etc but the generated path is the original auto-generated alias, not one of the custom aliases - hence my wondering how one might modify ezoe to ask the user which custom alias she would like to use (if one exists).

Thanks for taking the time to reply Gabriel but I was wondering wether this was do-able from the ezoe GUI without writing code - it seems to me otherwise that the custom URL alias's are only of limited use if they cannot be utilised at the GUI level.

I thought of the template override method as well, but cannot seem to retrieve a node using this kind of fetch (no error message) - thanks a lot regardless

Russ

Russell Michell, Wellington, New Zealand.
We're building! http://www.theruss.com/blog/
I'm on Twitter: http://twitter.com/therussdotcom

Believe nothing, consider everything.

Russell Michell

Tuesday 14 September 2010 7:09:44 pm

I have added this as enhancement 17284.

Cheers all,
Russ

Russell Michell, Wellington, New Zealand.
We're building! http://www.theruss.com/blog/
I'm on Twitter: http://twitter.com/therussdotcom

Believe nothing, consider everything.

Gabriel Finkelstein

Wednesday 15 September 2010 9:47:42 am

Why not just use Main/Folder2/your-page as the link?

What I mean is, why not just put "/Main/Folder2/your-page" as a regular link instead of an eznode link? Letting you choose which url alias you want to use is almost the same as typing the url yourself in the href input.

Russell Michell

Wednesday 15 September 2010 2:01:58 pm

Why not just use Main/Folder2/your-page as the link?

What I mean is, why not just put "/Main/Folder2/your-page" as a regular link instead of an eznode link? Letting you choose which url alias you want to use is almost the same as typing the url yourself in the href input.

Ah I see. I trued the full path (inc hostname) but that didn't work in my scenario (Static deployment) but using the URI (the pathname) did! I'd never bothered to look at using the 'other' field - but that works.

I maintain that some functionality in ezoe that prompts for an existing alias selection would be idea, but this will do me for now.

Thank you so much for your perseverance Gabriel! :-)

Have a good one!
Russ

Russell Michell, Wellington, New Zealand.
We're building! http://www.theruss.com/blog/
I'm on Twitter: http://twitter.com/therussdotcom

Believe nothing, consider everything.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu