Forums / Setup & design / Including an image inside a paragraph of an xml text

Including an image inside a paragraph of an xml text

Author Message

Zoltan Szabo

Saturday 14 August 2004 2:35:31 am

I try to include an image inside a paragraph of an xml text.
I mean someting like this:

<p><img src="images/01.jpg" width="113" height="150" hspace="8" vspace="2" border="1" align="right" />Then something begin</p>
<p>And then another paragraph</p>

The text is from an xml area.
Is it possible via a related object image and some special "class="?
Or some kind of overriding of the paragraph.tpl?
Or some custom tag?

Trond Åge Kvalø

Tuesday 17 August 2004 12:39:11 am

Do you use the online editor to edit you XML-textefields?

I do and here's the method I use to insert images into an XML textfield.

First I upload the images I need to the images folder in the media tab.

The I edit the article/folder/whatever that contain my XMLtextfield.

In the right hand table there's a field called related objects.

Click the magnifying glass, navigate to the media/images folder and choose the image(s) you want.

Now that the images are marked as related objects you can use the insert image button in the online editor.

Hope this made some sense.

If you can afford it, I recommend using the online editor.

Best regards
trondåge

trondåge

Zoltan Szabo

Wednesday 18 August 2004 3:05:48 am

Thank you, the including of related object is working (I do not use OE, because I use Firefox and Opera browsers).

The images are all right now, but if I would like to include a downloadable file INTO A ROW (and not under the last row), the system always put some

<div class="object-center">

into the source.

Can you help me, where can I find the responsible code, or how could I eliminate this DIV thing?

(There were some

<p>...</p>

parts also, but I could eliminate it via a paragraph.tpl override...)

--zol

Trond Åge Kvalø

Thursday 19 August 2004 2:14:57 am

Hi Zoltan.

Glad it worked.

I'm not sure about the downloadable file, though. But this is how I would have gone about to solve it.

First enable template debug in your site.ini.append, this will show you which template is used for the downloadable file. Then perhaps you could override this template the same way you did with paragraph.tpl?

There's an object.tpl in the same folder as paragraph.tpl that let's you choose whether the object is rendered as a block or inline. You could try to override that and see if that works.

best regards
trondåge

trondåge

Eckhard Schnell

Thursday 19 August 2004 2:49:30 am

Hello,

I post yesterday a bug for that. My solution is the following
i put the /design/standard/templates/content/datatype/view/ezxmltags/objetc.tpl in my design and i make some minor changes
here there are

    {section show=eq($object_parameters.class, "NoNewLine")|not}
    <div class="object-{$object_align}">
        {content_view_gui view=$view object_parameters=$object_parameters content_object=$object}
    </div>
    {section-else}
        {content_view_gui view=$view object_parameters=$object_parameters content_object=$object}
    {/section}

In the content.ini.append of your siteaccess or in the override you have to define the following

[object]
AvailableClasses[]=NoNewLine

Now you cann select in Properties field of that object the class NoNewLine.
The Object will be placed in the same line.

Eckhard Schnell

Eckhard Schnell
Siemens Business Services http://www.sbs.de
Privat: http://www.2schnell.de

Zoltan Szabo

Thursday 19 August 2004 7:44:52 am

Thank you, it's an elegant solution...

--zol

eZ debug

Timing: Jan 31 2025 01:17:43
Script start
Timing: Jan 31 2025 01:17:43
Module start 'content'
Timing: Jan 31 2025 01:17:43
Module end 'content'
Timing: Jan 31 2025 01:17:43
Script end

Main resources:

Total runtime0.1994 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 588.1719370.2734
Module start 'content' 0.00750.0157 958.44531,005.6094
Module end 'content' 0.02320.1761 1,964.05473,894.5391
Script end 0.1993  5,858.5938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00492.4771200.0002
Check MTime0.00150.7387200.0001
Mysql Total
Database connection0.00070.326910.0007
Mysqli_queries0.094347.27541410.0007
Looping result0.00150.74541390.0000
Template Total0.175688.110.1756
Template load0.00090.459010.0009
Template processing0.174787.604910.1747
Override
Cache load0.00060.316410.0006
Sytem overhead
Fetch class attribute can translate value0.00200.986510.0020
XML
Image XML parsing0.00030.125910.0003
General
dbfile0.01085.4041200.0005
String conversion0.00000.003930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs