Forums / Extensions / eZ Flow / Problems with adding HTML content to objects

Problems with adding HTML content to objects

Author Message

Marius Edvardsen

Saturday 20 September 2008 10:11:03 am

Im trying to create links or buttons so users easy can add content to the page. My only idea on how I do this is through a HTML <form> with the proper information inside. I did not manage to use a normal url with parameters in (like index.php?ClassID=38&NodeID=76 etc).

However when I try to paste my <form> into any page (after disabeling the WYSIWUG editor) I get the error message:

Input did not validate

* Left column: Unknown tag: <form>.

Is there any way to paste forms into pages, or is there any easyer way to create such shortcuts without using frames (using direct urls etc).

Gaetano Giunta

Sunday 21 September 2008 4:27:34 am

"I did not manage to use a normal url with parameters in (like index.php?ClassID=38&NodeID=76 etc)"

In eZ land, the parameters are not added to the url using the standard query string, but rather using a index.php/module/view/param1value/param2value syntax, such as in
/content/view/full/2 (content = module, view = view, 'full' = 1st param, 2 = 2nd param).
For more details see http://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics/modules_and_views

Note that your problem has nothing to do with frames - you cannot simply insert any kind of HTML you want in an xml-block attribute of an object, even though you have a rich editor for it. The html that is allowed in the attribute is quite limited, and it does not include forms.
To generate a real html form you will have to modify template code (ie. not in the admin interface, but via a programming GUI such as eclipse or phpedit).

If you do not need users to really create content object, but just participate in polls or send feedback, a useful feature and very simple to use is "information collector attributes". See http://ez.no/doc/ez_publish/technical_manual/4_0/concepts_and_basics/content_management/information_collection or http://ez.no/developer/articles/how_to_create_ez_publish_forms for more details

For allowing users to create content, a slightly outdated tutorial can be found here:
http://ez.no/ezpublish/documentation/building_an_ez_publish_site/the_guestbook Details might be slightly different, but the concept is the same.

The powercontent extension might also be helpful.

Principal Consultant International Business
Member of the Community Project Board

Michael schraeber

Monday 02 March 2009 2:04:57 am

Hello,
you can insert it very simple, if you have the HTML tag <literal> enabled:

<literal class="html">
YOUR HTML CODE
</literal>

best regards,
Michael

Cori Roberts

Wednesday 20 May 2009 8:49:19 am

@ Michael

So where would I put the literal tags, around the HTML every time it's added? Does it go in the CSS? Some PhP file?

The work around I came up with, because I use affiliate links that generate HTML for me, I just copied their image and then pulled out the URL and linked it to the image. But having the code actually work would be great! Let me know!

Gaetano Giunta

Thursday 21 May 2009 5:49:02 am

<i>So where would I put the literal tags, around the HTML every time it's added</i>

You need to develop your custom templates for this. Please read at least about the basic eZ Publish concepts in the online docs.

Principal Consultant International Business
Member of the Community Project Board

Cori Roberts

Wednesday 01 July 2009 3:18:40 pm

I'm looking through my old posts and still I've not figured out how to get this to work and I've read the docs as suggested but as I've said on every forum I post in, everyone here needs to understand that not everyone here is a developer and doesn't understand what you mean when you start going into great detail about strings and paths etc.

If I understood the programming mechanics of how eZ worked I wouldn't need to ask for help, I'd write them myself and be done with it.

Is there ANYONE here who can actually post some simple instructions like:

1. login
2. click go
3. type go dog run
4. Save
5. Refresh

Something..ANY help would be appreciated other than super super complicated explanations. I run a gaming site and simply don't have the time to read tons of documents, some terribly outdated, to find one solution when it would be easy for some of you to just explain in simpler terms. Not asking for a hand out, just a hand.

eZ debug

Timing: Jan 30 2025 00:47:09
Script start
Timing: Jan 30 2025 00:47:09
Module start 'content'
Timing: Jan 30 2025 00:47:09
Module end 'content'
Timing: Jan 30 2025 00:47:09
Script end

Main resources:

Total runtime0.2886 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0100 588.1172180.7578
Module start 'content' 0.01000.0124 768.8750103.0078
Module end 'content' 0.02250.2660 871.8828532.1719
Script end 0.2885  1,404.0547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00341.1805200.0002
Check MTime0.00140.4721200.0001
Mysql Total
Database connection0.00120.431010.0012
Mysqli_queries0.226278.36871410.0016
Looping result0.00150.51651390.0000
Template Total0.265592.010.2655
Template load0.00090.308810.0009
Template processing0.264691.661210.2646
Override
Cache load0.00050.177810.0005
Sytem overhead
Fetch class attribute can translate value0.00060.204410.0006
XML
Image XML parsing0.00030.102310.0003
General
dbfile0.01264.3717200.0006
String conversion0.00000.002130.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.0002 secs