Using an image as a button

Author Message

James Packham

Friday 09 January 2004 4:56:05 am

Hi, I know this is a really basic question but how do I use an image as a button in my templates? I've been searching and experimenting for a while now, but no luck! I'm sure I've done this in the past, but can't remember how!

Thanks,

James

Claus Jensen

Friday 09 January 2004 5:27:54 am

Hi James,
Here ya go:
<input name="SearchButton" type="image" src={"go.gif"|ezimage} value="{'Search'|i18n('design/standard/layout')}" width="26" height="26" border="0" />

James Packham

Friday 09 January 2004 6:56:23 am

Thanks!

James Packham

Friday 09 January 2004 9:47:51 am

Had another thought on this - is there a way to use an image attached to an object (e.g. thumbnail image attached to an article, just an example - Obviously I'd create a new class to do this for security reasons) as the button?

Claus Jensen

Monday 12 January 2004 1:40:07 am

Hi,
Do you mean to display this image in the article, that is very possible. But I dont know if I understood you right.

regards,
claÜs

James Packham

Monday 12 January 2004 6:35:20 am

I meant display the image from an article and make it "clickable" or more precisely let the user click on it to use it as an eZPublish button. But having had the chance to think about it, it's probably quite complicated hack right?

Regards,

James

Claus Jensen

Tuesday 13 January 2004 12:27:00 am

Hello,
You mean click and it will take you to another www-address? Like a html-link? That I have done myself, and if that is what you mean, its really easy. Just...: <a href="www.something.com"><img src="yourpic.jpg"></a>
or you also may use a javascript I think, like this: <img src="pic.jpg" onClick="Javascript:document.form.submit();"> or something like that.

regards,
claÜs

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 04:16:44
Script start
Timing: Jan 19 2025 04:16:44
Module start 'layout'
Timing: Jan 19 2025 04:16:44
Module start 'content'
Timing: Jan 19 2025 04:16:45
Module end 'content'
Timing: Jan 19 2025 04:16:45
Script end

Main resources:

Total runtime0.9205 sec
Peak memory usage4,096.0000 KB
Database Queries69

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.1563152.6250
Module start 'layout' 0.00560.0032 741.781339.4453
Module start 'content' 0.00870.9105 781.2266546.3750
Module end 'content' 0.91920.0013 1,327.601616.1641
Script end 0.9205  1,343.7656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3707160.0002
Check MTime0.00140.1481160.0001
Mysql Total
Database connection0.00060.062910.0006
Mysqli_queries0.861493.5711690.0125
Looping result0.00090.1016670.0000
Template Total0.883996.020.4420
Template load0.00240.259520.0012
Template processing0.881595.760620.4408
Template load and register function0.00010.015710.0001
states
state_id_array0.00140.154710.0014
state_identifier_array0.00130.136720.0006
Override
Cache load0.00190.2056330.0001
Sytem overhead
Fetch class attribute can translate value0.00090.097520.0004
Fetch class attribute name0.00180.194980.0002
XML
Image XML parsing0.00060.068920.0003
class_abstraction
Instantiating content class attribute0.00000.0022110.0000
General
dbfile0.00090.0973160.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
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs