edit and create new buttons ...

Author Message

luca maroni

Thursday 01 March 2007 6:53:14 am

Hi to everybody,

I'm trying to insert "edit" button and "create new" button directly on the web site view of my site, because I want to edit the pages dirctly from my site. Edit button seems to work well but nothing with the button to create a new page(folder class).

To do this I customized the template full.tpl when it shows content of folder class and I'm trying to insert code like this:

"edit" button:
<form method="post" action={concat("content/edit/",$node.contentobject_id,"/f/")|ezurl}>
<input class="button" type="submit" name="editButton" value="edit page" />
</form>

"create new" button:
<form method="post" action={"content/action/"|ezurl}>
<input type="hidden" name="ContentLanguageCode" value="eng-GB" />
<input type="hidden" name="ContentObjectLanguageCode" value="eng-GB" />
<input class="button" type="submit" name="NewButton" value="new page" />
<input type="hidden" name="ClassID" value="Folder" />
<input type="hidden" name="NodeID" value="{$node.node_id}" /
</form>

what is wrong??? ,-(

thanks to everybody
Luca

luca maroni

Wednesday 07 March 2007 2:03:07 am

the error was that I was filling the ClassID with the name of the class and not the ID number. So now it's working!

I solved because I found a very nice article in documentation about that:
http://ez.no/ezpublish/documentation/customization/tips_tricks/editing_creating_and_removing_content_from_the_user_page

Thanks to all and sorry for my simple question :-)

Ciao
Luca

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 18 2025 11:21:24
Script start
Timing: Jan 18 2025 11:21:24
Module start 'layout'
Timing: Jan 18 2025 11:21:24
Module start 'content'
Timing: Jan 18 2025 11:21:24
Module end 'content'
Timing: Jan 18 2025 11:21:24
Script end

Main resources:

Total runtime0.0182 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 587.9141152.6250
Module start 'layout' 0.00680.0032 740.539139.4453
Module start 'content' 0.01000.0065 779.984489.2109
Module end 'content' 0.01650.0017 869.195330.3047
Script end 0.0182  899.5000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002413.0500140.0002
Check MTime0.00115.7686140.0001
Mysql Total
Database connection0.00137.325810.0013
Mysqli_queries0.002915.808730.0010
Looping result0.00000.082410.0000
Template Total0.00147.610.0014
Template load0.00074.106810.0007
Template processing0.00063.493610.0006
Override
Cache load0.00042.429310.0004
General
dbfile0.002413.195180.0003
String conversion0.00000.048440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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