Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2009-05-23 18:53:15

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Multidoc: multiple-page documents

net-carver wrote:

BTW, the download page, whilst referring to version 1.0.a.5 seems to be delivering v1.0.a.4 to me. Is a.5 publicly available yet?

Oh cripes, yes a.5 is supposed to be there. It’ll be a.6 in a little bit, and this time I’ll check I’m actually uploading the new version. Thanks again.


Code is topiary

Offline

#14 2009-05-23 18:56:34

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Multidoc: multiple-page documents

net-carver wrote:

which seems to be matching only cfs 1..9 and missing the double digit match needed for the 10th field (and beyond if using Gerhard’s plugin.) Replacing with…

OK, I should read things more thoroughly. Thanks VERY much, and I’ll add that too.

Edit

v 1.0.a.6 now available.

Last edited by jsoo (2009-05-23 19:35:07)


Code is topiary

Offline

#15 2009-05-24 09:21:57

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Multidoc: multiple-page documents

Jeff

Downloaded the latest and it’s working just fine now.

This is looking very nice for step-by-step tutorials and sequenced about pages — thank you!


Steve

Offline

#16 2009-06-02 22:34:18

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Multidoc: multiple-page documents

Thanks to net-carver/Steve for his elegant suggestion, I have scrapped the soo_multidoc_article and soo_multidoc_article_custom tags; normal article and article_custom tags now give the desired behavior for Multidoc articles in article lists. There are also a few minor changes to soo_multidoc_pager.

Get v 1.0.a.7.


Code is topiary

Offline

#17 2009-06-03 03:51:14

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Multidoc: multiple-page documents

Jeff

so that wild idea actually worked? Nice.


Steve

Offline

#18 2009-06-03 10:07:50

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Multidoc: multiple-page documents

Works a treat and only needed about 10 lines for the callback function itself. Seems to have improved speed on article lists, even witout caching or pre-computed tables as you had suggested. Thanks again.


Code is topiary

Offline

#19 2009-07-05 15:58:31

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Multidoc: multiple-page documents

Promoted from alpha to beta: now at version 1.0.b.1

Important This is a major upgrade, because the underlying library has been overhauled. Use care when upgrading an existing Multidoc site; I don’t expect issues but YMMV. If you run soo_image you will need to upgrade it at the same time.

No significant new features per se, other than a downshift to v2.0 of the GPL to match the Txp license.

Full user guide, including download & installation instructions


Code is topiary

Offline

#20 2009-07-09 13:45:17

woof
Member
Registered: 2004-08-01
Posts: 128

Re: Multidoc: multiple-page documents

Hi J Soo

Finally getting to grips with this plugin and finding its great for organising articles.

I’m trying to figure out if I could incorporate the toc list into my site’s main nav – Is it possible to output a nested list of Multidocs in txp:article_custom’s output?

e.g. I want to dynamically* output something like this as my site’s main nav (where Article2 in SECTION_1 below is a Multidoc )

<ul id="nav">

	<li><a href="#url">HOME</a></li>

	<li><a href="#url">SECTION_1</a>
		<ul>
			<li><a href="#url">Article1</a></li>
			<li><a href="#url">Article2</a>
			<!-- begin Multidoc output -->
				<ul>
					<li><a href="#url">MultidocArticle_a</a></li>
					<li><a href="#url">MultidocArticle_b </a></li>
				</ul>
			<!-- end Multidoc output -->
			</li>
			<li><a href="#url">Article3</a></li>
			<li><a href="#url">Article4</a></li>
		</ul>
	</li>

	<li><a href="#url">SECTION_2</a>
		<ul>
			<li><a href="#url">Article5</a></li>
			<li><a href="#url">Article6</a></li>
			<li><a href="#url">Article7</a></li>
			<li><a href="#url">Article8</a></li>
		</ul>
	</li>

</ul>

(*dynamic article output only, sections are hard-coded)

I thought using soo_multidoc_toc in the article_custom’s form as follows might achieve it but it doesnt seem to work inside article tags

<txp:if_first_article><ul></txp:if_first_article>
<li>
<txp:permlink><txp:title /></txp:permlink><txp:soo_multidoc_toc />
</li>
<txp:if_last_article></ul></txp:if_last_article>

Am I pushing it in the wrong direction… or missing something obvious?

thanks woof

Offline

#21 2009-07-09 15:45:22

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Multidoc: multiple-page documents

Currently the output tags only produce output in individual article context. The general initialization routine is pretty complicated, just dealing with a single collection. I didn’t want to get into potentially initializing multiple collections because of the added complexity and also the performance hit — there is already a noticeable performance cost to using Multidoc.

However, it might be reasonable to offer a limited set of navigation links for Start articles only, just listing top-level content. So for a hierarchical collection such as the Multidoc user guide, this listing would just show top-level sections. I’ll give it some thought. Do you think that would fit your needs?


Code is topiary

Offline

#22 2009-07-09 16:23:12

woof
Member
Registered: 2004-08-01
Posts: 128

Re: Multidoc: multiple-page documents

Thanks J Soo. To answer your question — In my specific case I’d be happy showing just 1 level under the 1st Multidoc page. But I don’t want to overcomplicate things for you or the plugin which is really amazing as it is. For my immediate needs I’ll just readjust my ambition and use soo_multidoc_toc to output contents in a separate list — similar to how it is in your Multidoc user guide.

BTW What spurred my attempt at nesting the Multidoc toc inside the main site navigation unordered list was so I could then fully use this neat way to create a sitemap from HTML unordered list navigation: http://astuteo.com/slickmap/

Offline

#23 2009-07-09 19:45:07

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Multidoc: multiple-page documents

woof wrote:

What spurred my attempt at nesting the Multidoc toc inside the main site navigation unordered list was so I could then fully use this neat way to create a sitemap from HTML unordered list navigation: http://astuteo.com/slickmap/

That is indeed some slick CSS work. Thinking more about your idea, even the limited output I suggested is going to be more difficult than I first thought (I’ve been typing that last phrase a lot lately, it seems). Especially if this nav is to be reproduced on every page: Multidoc treats individual article pages very differently from list pages. My method of getting article lists to suppress Multidoc interior pages is to create a temporary textpattern table that excludes them. In other words, as far as that article list is concerned, the suppressed pages don’t exist. Difficult to link to them, then :)

I have been thinking, rather vaguely, about creating some kind of Multidoc backend admin tab: allow one to view collections various ways, and assign or re-arrange pages without having to edit the custom field. Conceivably along with this there could be a cache holding at least some information about all collections, and this cache might be used to produce the kind of navigation element you have envisioned. The cache would be updated on the admin side, either automatically after an edit, or manually, so it wouldn’t slow viewer page loads. Just brainstorming at this point.


Code is topiary

Offline

#24 2009-09-18 14:21:17

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Multidoc: multiple-page documents

Version 1.0.b.2 just released.

  • New tags:
    • soo_multidoc_page_title (drop-in replacement for page_title)
    • soo_multidoc_breadcrumbs breadcrumb trail within Collections
  • changed to new soo_plugin_pref plugin for preference management

User guide & downloads.


Code is topiary

Offline

Board footer

Powered by FluxBB