</producer>
-<producer name="topicpages">
-
- <verbs>
- <verb name="new" description="latest 3 of every topic">
- <Set key="_topics" value="-1"/>
- <Set key="pages" value="3"/>
- </verb>
- <verb name="all" description="all pages of all topics">
- <Set key="_topics" value="-1"/>
- <Set key="pages" value="-1"/>
- </verb>
- <verb name="sample" description="latest 4 of first 2 topics">
- <Set key="_topics" value="2"/>
- <Set key="pages" value="4"/>
- </verb>
- </verbs>
-
- <body>
- <Enumerate key="topic" table="topic" limit="_topics">
- <Define key="docSuffix" value=".html"/>
- <Define key="storageSuffix" value=".html"/>
-
- <List key="special" table="content c"
- selection="c.is_published='1' and c.to_article_type = ${articletype.topicspecial} and c.id=cxt.content_id and cxt.topic_id = ${topic.id}"
- order = "webdb_create desc" limit="1"
- extratables="content_x_topic cxt"/>
-
- <Batch key="articles" infokey="batch" table="content c"
- process="pages" batchsize="20" minbatchsize="10"
- selection="c.is_published='1' and c.to_article_type in (${articletype.newswire}, ${articletype.feature}) and c.id=cxt.content_id and cxt.topic_id = ${topic.id}"
- order="webdb_create asc" extratables="content_x_topic cxt">
- <batches>
- <Define key="archivetitle" value="${topic.title}"/>
- <Define key="archivefilename" value="${topic.filename}"/>
- <Define key="pagePrefix" value="index"/>
- <Define key="storagePrefix" value="${config["Producer.StorageRoot"]}/${topic.filename}/${pagePrefix}"/>
- <Define key="docPrefix" value="${config["Producer.DocRoot"]}${pagePrefix}"/>
- <If condition="(batch.current.index!=batch.first.index)">
- <then>
- <Define key="previouspageurl"
- value="index${batch.previous.identifier}.html" />
- </then>
- <else>
- <Define key="previouspageurl" value="" />
- </else>
- </If>
- <If condition="(batch.current.index!=batch.last.index)">
- <then>
- <Define key="nextpageurl"
- value="index${batch.next.identifier}.html" />
- </then>
- <else>
- <Define key="nextpageurl" value="" />
- </else>
- </If>
- <Generate
- generator="topicpage.template"
- destination="${storagePrefix}${batch.current.identifier}${storageSuffix}"/>
- </batches>
- </Batch>
- </Enumerate>
- </body>
-
-</producer>
</verbs>
<body>
-
+ <Set key="counter" value="1"/>
<Enumerate key="fpimage" table="image" selection="to_media_folder=8 and is_published=true" >
<Log message="generating include for image id: ${fpimage.id}" type="info" />
<Generate
generator="/fpinclude.template"
destination="${config.storageRoot}/fpincludes/${fpimage.id}.inc" />
-
+ <Set key="counter" value="counter+1" />
</Enumerate>
<verb name="doit" />
</verbs>
<body>
- <FreeQuery key="topicCounts" query=" SELECT count(c.id) AS count, t.title AS title from content c, topic t, content_x_topic x
- WHERE c.id = x.content_id AND t.id = x.topic_id GROUP BY t.title ORDER BY length(t.title)"
+ <FreeQuery key="topicCounts" query=" SELECT count(x.content_id) as count, t.title FROM topic as t LEFT OUTER JOIN content_x_topic
+ as x ON (t.id=x.topic_id) LEFT OUTER JOIN content as c ON (c.id=x.content_id)
+ WHERE t.archiv_url = 'Category' GROUP BY t.title ORDER BY length(t.title)"
type="set"/>
<Generate generator="/topiccount.template"