Automatic multi page article with table of contents ?

Author Message

newave france

Thursday 01 December 2005 8:10:57 am

Hello,

I'm sorry for this basic question but I can't find how to solve it.

How can I create a multi page article an generate automatically a table of contents of it ?

What's the way to do it ?

Here what I tried : In my "article" folder, I've created a sub-folder for my multi-page article. Each page of my article is in this folder.

In the "full" template of my "article" class, I've but this :

{* Article - Full view *}

{literal}
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
{/literal}
<form name="form1">
  <select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
    <option selected>Sommaire</option>
    <option value={$node.url_alias|ezurl}>{$node.object.data_map.title.content|wash}</option>
  </select>
</form>

But it's only display the current page link in the list...

Thanks for your help,

Best Regards

Nathan Kelly

Friday 02 December 2005 3:28:21 am

Hi newave, I am half way through answering this question for you, I have been writing up a guide of how to do this but the night is getting a little long in the tooth so I've stopped working on it at the moment.

A couple of questions:
Are you under a deadline to get this done?
Is this the type of thing you're after: http://www.kirupa.com/developer/actionscript/predicting_collisions.htm (though this has no TOC)?

I have been looking at different ways this could be achieved and in a day or two I may have a solution (it's the weekend here so it may be three days ;) .)

I think my idea is solid but I need to test it.

Hang in there, I'll see what I can come up with.

Cheers!

Pardon me while I burst into flames...

newave france

Friday 02 December 2005 4:29:19 am

Hello Nathan,

thanks for your answer (I'm in France so we are not writing at the same time, sorry ;)

"Are you under a deadline to get this done?"
No, I'm doing test and developpement for an adaptation of a website, it's not on a hurry.

"Is this the type of thing you're after: http://www.kirupa.com/developer/actionscript/predicting_collisions.htm (though this has no TOC)?"
Yes, it's very good, it's a part of what I'd like to do, if we could display a TOC too with the title of each page it could be really fine. Congratulations for your job, it's really great. Is it only with the template of the "article-full" or is it a more complexe thing, like an extension ?

Here an example of what i'm looking for (this is an article module in a forum's software, we have a TOC and a block with "next page/ previous page").
http://www.thevbgeek.com/showthread.php?t=262

So, when this multipage article will be ready I will test it with a lot of pleasure... Just tell me here ;)

Best Regards

Nathan Kelly

Friday 02 December 2005 3:31:11 pm

Hi newave, thats not my site (kirupa.com), just one I visit and it's not built on eZpublish, I just used it as an example.

I'll look into that vbgeek module, I have a feeling the only way you will be able to achieve what you want through eZ will be to create a main article class that can contain children, then for each page you need you add a child under the main article.

I'm working on it at the moment to see how we need to set up the templates for this to work, shouldn't be too difficult.

Will let you know how I go in a couple of days.

Cheers!

Pardon me while I burst into flames...

Ɓukasz Serwatka

Saturday 03 December 2005 4:13:24 am

This is might be useful:
http://ez.no/products/ez_publish_cms/documentation/customization/tips_tricks/splitting_an_article_over_several_pages

You can look also on weblog_full.tpl from base design dir, and reuse code for <<previouse next>> navigation. For building TOC just use list fetch.

2 classes:

Article (Folder)
- Article (page) as sub-nodes

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

newave france

Saturday 03 December 2005 4:27:06 am

Hello Nathan, thanks for this informations, I keep connected with your project !

Hi Lukasz, thanks a lot, it's really what I was looking for ! I'll try this on monday, it seems to be easy to do and really useful for readers of the article.

Thanks and of course I'll let you know how I go with this in a couple of days...

Best Regards

 

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 22:36:33
Script start
Timing: Jan 18 2025 22:36:33
Module start 'layout'
Timing: Jan 18 2025 22:36:33
Module start 'content'
Timing: Jan 18 2025 22:36:34
Module end 'content'
Timing: Jan 18 2025 22:36:34
Script end

Main resources:

Total runtime1.2404 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 588.0391152.6406
Module start 'layout' 0.00630.0035 740.679739.4922
Module start 'content' 0.00981.2287 780.1719626.6250
Module end 'content' 1.23840.0019 1,406.796916.1250
Script end 1.2403  1,422.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2832160.0002
Check MTime0.00140.1100160.0001
Mysql Total
Database connection0.00100.080610.0010
Mysqli_queries1.157993.3512680.0170
Looping result0.00090.0721660.0000
Template Total1.205997.220.6030
Template load0.00200.163320.0010
Template processing1.203997.057720.6019
Template load and register function0.00030.021510.0003
states
state_id_array0.00150.121010.0015
state_identifier_array0.00140.110020.0007
Override
Cache load0.00180.1434550.0000
Sytem overhead
Fetch class attribute can translate value0.00060.047230.0002
Fetch class attribute name0.00110.088780.0001
XML
Image XML parsing0.00160.127630.0005
class_abstraction
Instantiating content class attribute0.00000.001790.0000
General
dbfile0.00110.0864240.0000
String conversion0.00000.000840.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/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: 30
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs