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.

eZ debug

Timing: Jan 31 2025 06:24:36
Script start
Timing: Jan 31 2025 06:24:36
Module start 'layout'
Timing: Jan 31 2025 06:24:36
Module start 'content'
Timing: Jan 31 2025 06:24:37
Module end 'content'
Timing: Jan 31 2025 06:24:37
Script end

Main resources:

Total runtime1.2755 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.2656151.2266
Module start 'layout' 0.00480.0022 739.492236.6797
Module start 'content' 0.00701.2678 776.17191,009.0000
Module end 'content' 1.27480.0007 1,785.171915.8125
Script end 1.2755  1,800.9844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2432160.0002
Check MTime0.00140.1081160.0001
Mysql Total
Database connection0.00090.067910.0009
Mysqli_queries1.216595.3729680.0179
Looping result0.00060.0480660.0000
Template Total1.243697.520.6218
Template load0.00200.154320.0010
Template processing1.241697.344020.6208
Template load and register function0.00120.092510.0012
states
state_id_array0.00150.116010.0015
state_identifier_array0.00120.090420.0006
Override
Cache load0.00180.1379570.0000
Sytem overhead
Fetch class attribute can translate value0.00040.033130.0001
Fetch class attribute name0.00150.116670.0002
XML
Image XML parsing0.00070.054830.0002
class_abstraction
Instantiating content class attribute0.00000.001070.0000
General
dbfile0.00070.0580160.0000
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 39
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs