cotonti.com : Multiple lists https://www.cotonti.com Последние сообщения в теме Cotonti en Sun, 19 Oct 2025 05:42:03 -0000 Hodges I was afraid of that; it's been so long!

Well, here's a list.tpl:

<!-- BEGIN: MAIN -->

	<div class="mboxHD">
	{LIST_PAGETITLE}<div class="mboxHDright">{LIST_CATDESC} &nbsp; &nbsp; {LIST_SUBMITNEWPAGE}</div></div>
	<div class="mboxBody">
	
	<h1>{LIST_CATTITLE}</h1>
	
	<div style="text-align:justify;margin: 0px 0px 20px 0px">{PHP.cfg.freetext3}</div>
	<!-- BEGIN: LIST_SUBLIST -->
		<table class="cells">
			<tr>
				<td class="coltop">{LIST_TOP_TITLE} {LIST_TOP_COUNT}</td>
				<td class="coltop" style="width:96px;">{LIST_TOP_DATE}</td>
			</tr>
			<!-- BEGIN: LIST_ROW -->
			<tr class="{LIST_ROW_ODDEVEN}">
				<td>
					<strong><a href="https://www.cotonti.com/{LIST_ROW_URL}">{LIST_ROW_TITLE}</a></strong> {LIST_ROW_FILEICON}<br />
					<span class="desc">{LIST_ROW_DESC} ({PHP.L.Hits}: {LIST_ROW_COUNT})</span>
				</td>
				<td class="centerall">{LIST_ROW_DATE}</td>
			</tr>
		<!-- END: LIST_ROW -->

		</table>
	<!-- END: LIST_SUBLIST -->
</div>

<!-- END: MAIN -->

New tags are LIST_SUBLIST.

As far as the plugin goes, it needs to:

  1. Read parent path(s) from plugin config (e.g. 1.1).
  2. For each path see if(exists) daughter categories (e.g. 1.1.1, 1.1.2, 1.1.3).
  3. Then assign each page of daughter categories to a new row in a new list (e.g. 4 pages from 1.1.1, 2 pages from 1.1.2 and 5 pages from 1.1.3).
  4. When localhost/list.php?c=apples is requested (and apples has path 1.1) then all lists (1.1.1, 1.1.2, and 1.1.3) are displayed on the same page.

I have no idea how to begin implementing this! frown

]]>
вт, 20 сен 2011 10:22:09 -0000
GHengeveld That will require a plugin. You can have a look at CombiLists. Although it does something similar to what you want, it's not the same. It simply combines items from multiple categories into a single list. Perhaps you can modify it.

]]>
пн, 19 сен 2011 21:21:21 -0000
Hodges Hi,

How do I enable multiple lists of pages to be shown at once?

For instance, being able to list pages belonging to category of path 1.1, and in a new list on the same webpage, list pages belonging to category of path 1.2 where both category of path 1.1 and category of path 1.2 belong to category of path 1.

Cheers,
Hodges

]]>
пн, 19 сен 2011 16:48:37 -0000