Internal link to articles, folders and files

Author Message

willy jansen

Wednesday 03 November 2004 6:55:08 am

What tag can I use (and how do I use it) to create a link to another article or folder in my site.

I'd like to create something like...

<link href="/content/view/123">Click on me please!!!</link>

(assuming i created an article with ID 123 eralier on)

I also want to create a link to an "attached" file, like this...

<link href="/file/download/123">Click on me please to download the file!!!</link>

I have been browsing the forums for this (because it seems basic stuff) but I didn't find a good solutions.
This...

<link id=123>Click on me please !!!</link>

only works when the link is already stored...

Maybe I don't understand exactly how urls must be treated in ezpubli.

All hints and suggestions are welcome.

Balazs Halasy

Wednesday 03 November 2004 11:56:50 am

Hi,

As far as I know you still have to input the entire URL (http://www.example.com/content/view/full/123 or the nice/virtual version) as the href parameter. During the next development cycle we'll most probably implement the internal link feature which will let you create internal links in an easier and more dynamic/elegant way. Stay tuned.

Balazs

willy jansen

Thursday 04 November 2004 1:24:11 am

Alright.

And what about the files?
Can you put a link like /file/download/125 ? or must it be /file/download/727/733/this%20is%20a%20file%20with%20spaces%20initsname.dic

what puzzles me is that by relating an object and using the object tag you almost achieve an internal link to another page,file,folder,etc inside your system. except for the fact that you cannot define the "link text" ("click on me please") that is outputted by that tag...

thanks balazs.
nice hat by the way

willy jansen

Monday 15 November 2004 9:20:54 am

ok. i fingered a solution.

created a custom tag (find instruction here: http://www.ez.no/ez_publish/documentation/customization/components/datatypes/ezxmltext/custom_tags) called "ilink"

in my ilink.tpl i have

<a href="/index.php/gmc6/content/view/full/{$nodeid}">
 {$content}
</a>

in my article xmlfield i call this tags as follows

<custom name='ilink' nodeid="118">
 A link to an internal article or folder
</custom>

works good enough for me

but I'm still VERY MUCH inetersted in how to creat links to files (attached as related objects to the article)

poon sg

Sunday 21 November 2004 11:41:05 pm

Sorry for clicking this topic.
Is it possible to let guest use this way to create a internal link?(i only can know the related object id)
1)how to obtain node id from object id ?
2)use another way?
3)if I related an article to a article intro., how to let it display in one line
example:

detail pls see <object id='1234'>

in guest interface it will display as below:
<i>detail pls see
file 1
Read More</i>

but I want to display
<i>detail pls see file 1
Read More</i>

any advanced very be high appreciated.
regards!
sgpoon

poon sg

Sunday 21 November 2004 11:59:48 pm

any idea or help?
sgpoon

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.