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.