New Message: Re: Generating site index of news items by department

webmaster at userland.com webmaster at userland.com
Tue May 9 11:32:07 CDT 2006


A new message was posted:

Address: http://manila.userland.com/discuss/msgReader$1760

By: Matt Deatherage (frontier at gcsf.com)

OK, well, first, the "viewNewsItems" macro is legal on this site, so on the Web and in RSS, none of your examples actually show up - Manila.UserLand.Com is trying to render them and not finding "department 1". I only read it on the mailing list. Here's what you tried to post:

\{viewNewsItems ("department 1")} All items show, even items from departments 2 and 3

\{viewNewsItems (1, "department 1")} Works fine, latest item shows from department 1

\{viewNewsItems (5, "department 1")} no good, only latest item shows from department 1

\{viewNewsItems (5, "department 1", "{itemTitle}")} no good, only latest item shows from department 1, no template control

That said, the first example should fail. UserTalk macros take either names or positional parameters: If you leave the names off the parameters, they have to all appear in the proper order through the last one you want.

In other words, if you want to supply only the second parameter to a macro, like the department name for viewNewsItems, you must either supply both of the first two parameters without names, or supply only the second parameter with a name:

\{viewNewsItems(10, "department 1")} // 10 is the default for n, parameter 1
\{viewNewsItems(department:"department 1")} //use names for out-of-order parameters

I don't know why your third and fourth examples aren't working; they appear to have correct syntax.

This is a Manila site... http://manila.userland.com/.




More information about the Manila-Users mailing list