On 19 Dec 2005, at 14:46, Kim Ryan wrote:

Hi,

This is probably a very simple question, but am still unsure how to do what I want.



It's less simple than I thought. Here's part of what I have in a substitute template for the default front page which does more or less what you're looking for.
[% USE dumper; dumper.dump_html($thing) %] to work out what's going on.

I'm having a related problem right now, but I'll post about it later.

[% FOR col = classmetadata.columns;
            NEXT IF col == "id";
            SET element = classmetadata.cgi.$col;
            NEXT UNLESS col == "project" or col == "category";
         %]
            <label>
<td valign="top">
<span class="specialfield">[% classmetadata.colnames. $col; %]</span><br />
<ul>
[%
IF col == "project" or col == "category";
  FOREACH el = element.content(col); %]
<li> <input type = "checkbox" value = "[% el.value %]" name = "[% col %]"> <a href="[% base %]/[% classmetadata.moniker %]/search/?[% col %]=[% el.value %]">[% el.content.0 %]</a> </input> </li>
[% END ;
END ; %]
</label></ul></td>
[% END; %]
</tr>
<tr><td>
    <input type="submit" name="Browse" value="Browse"/>
    </fieldset>
</form></td><td></td></tr>
</table>





I have a table called tests with a column called code, which holds the code id Another table, result_code has a primary key called code, plus a column
called description

When I view the tests table, I would like to see the code description rather than the code id.

Am trying the following, but the code id is still displayed.
MyDB::Tests->has_a(code => "MyDB::result_code");

Do I have to refer to the column to display form the result of the join, such as
MyDB::Tests->has_a(code => "MyDB::result_code::description");

Thanks,

Kim






-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Maypole-users mailing list
Maypole-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maypole-users



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Maypole-users mailing list
Maypole-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maypole-users

Reply via email to