embeded image link

Author Message

Martin Ulrich

Friday 06 February 2004 6:05:23 am

I put embeded Images/thumbnails in my article with related objects: <object id="xxx" /> And sometimes I want to linked to external link with <object id="xxx" href="xxx"/> - that works fine.
And sometimes I'd like to link to internal link, means to the full view of the related object.

<object id="xxx" href="/ezurl/gallery/.../"/> works, but I'like to have a shorter solution, that If there is NO external url, than take the relative Link (full view).

Surely I have to modify embed_image.tpl, specially
{section show=is_set($attribute_parameters.href)}
{set href=$attribute_parameters.href}
{section-else}
{set href=""}
{/section}

unfortunately don't know how ;-((

Are there some profis out there to help me?
thanks in advance.

;-O

Have A drink or two on You than

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

Wenyue Yu

Friday 06 February 2004 7:05:00 am

Hi,

An example of how to edit embed_image.tpl to achieve your requirment. Change following line

{section show=$href}<a href={$href|ezurl} target="{$attribute_parameters.target}">{/section}

to

{section show=$href}<a href={$href|ezurl} target="{$attribute_parameters.target}">
{section-else}<a href={concat('/content/view','/full/',$object.main_node_id)|ezurl}>{/section}

Remebmer that you need to change this in three places in this template (left, right and imagecenter case).

Regards,
wenyue

Martin Ulrich

Friday 06 February 2004 11:20:32 am

Thank you!!!!!!! works fine. *I'll give an Euro to clochard, really* :-)

_______________________

http://artenic.de ARTENIC - Publishing mit allen Mitteln!

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 19 2025 03:17:36
Script start
Timing: Jan 19 2025 03:17:36
Module start 'layout'
Timing: Jan 19 2025 03:17:36
Module start 'content'
Timing: Jan 19 2025 03:17:37
Module end 'content'
Timing: Jan 19 2025 03:17:37
Script end

Main resources:

Total runtime0.9294 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 593.2813152.6094
Module start 'layout' 0.00660.0032 745.890639.4141
Module start 'content' 0.00980.9182 785.3047501.9063
Module end 'content' 0.92790.0014 1,287.210912.1875
Script end 0.9294  1,299.3984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3688160.0002
Check MTime0.00140.1527160.0001
Mysql Total
Database connection0.00110.114110.0011
Mysqli_queries0.880894.7745570.0155
Looping result0.00060.0603550.0000
Template Total0.897996.620.4490
Template load0.00210.224520.0010
Template processing0.895896.384020.4479
Template load and register function0.00020.021810.0002
states
state_id_array0.00160.173210.0016
state_identifier_array0.00150.160220.0007
Override
Cache load0.00170.1870280.0001
Sytem overhead
Fetch class attribute can translate value0.00090.100020.0005
Fetch class attribute name0.00100.111030.0003
XML
Image XML parsing0.00020.025920.0001
class_abstraction
Instantiating content class attribute0.00000.000830.0000
General
dbfile0.00110.1135100.0001
String conversion0.00000.001140.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs