You are not logged in.
Thanks, Wet.
“Never attribute to malice that which can be adequately explained by stupidity.”
— Hanlon’s Razor
Offline
Recent: wet_haystack ׀ Popular: wet_slimpattern ׀ Handy: wet_quicklink | Me
Offline
Rock and roll. You just made my week. :-)
“Never attribute to malice that which can be adequately explained by stupidity.”
— Hanlon’s Razor
Offline
Sorry to bump an old thread, but I want to use a custom field for inputting a link ID for a form like this:
<txp:zem_link linkid="<txp:custom_field name="fieldname"/>"/>
Any way to achieve this?
Last edited by jrphelps (2006-08-19 19:10:36)
Offline
Mary, that worked for outputting the anchor tag, but the anchor text does not output automatically with this code. If I use <txp:zem_link linkid="5" /> it outputs the name of the link as the linked text. I tried looking at the code, but I couldn’t see what was making the difference.
Offline
Recheck if you properly replaced fieldname with the name of the custom field you wanted to use (not custom_3, but the real name as set via preferences).
Works here as described. If this is wrong, zem_link will output an empty <a href="..."></a> element linking to the current article.
Last edited by wet (2006-08-22 04:10:09)
Recent: wet_haystack ׀ Popular: wet_slimpattern ׀ Handy: wet_quicklink | Me
Offline
wet: I think I did, but here is my code for your amusement reference:
<code><strong><txp:if_article_list><txp:permlink><txp:posted format=”%B %e” /> | <txp:title /></txp:permlink><txp:else /><txp:posted format=”%B %e” /> | <txp:title /></txp:if_article_list></strong><br />
<txp:if_article_list>
<txp:excerpt />
<txp:else />
Rain Crow will play at <txp:php>
global $thisarticle;
$a = custom_field (array (‘name’ => ‘Venue Link ID’));
echo zem_link(array(‘linkid’ => $a));
</txp:php> on <txp:posted format=”%A, %B %e” />.<br />
<txp:body />
</txp:if_article_list></code>
If you see anything wrong with that, by all means let me know!
Last edited by jrphelps (2006-08-21 16:48:49)
Offline
jrphelps wrote:
<txp:if_article_list><txp:permlink><txp:posted format="%B %e" /> | <txp:title /></txp:permlink><txp:else /><txp:posted format="%B %e" /> | <txp:title /></txp:if_article_list></strong><br />
<txp:if_article_list>
<txp:excerpt />
<txp:else />
Rain Crow will play at <txp:php>
global $thisarticle;
$a = custom_field (array ('name' => 'Venue Link ID'));
###
echo 'here:'; dmp($a); echo ':there';
###
echo zem_link(array('linkid' => $a));
</txp:php> on <txp:posted format="%A, %B %e" />.<br />
<txp:body />
</txp:if_article_list>
Let’s get curious! What is printed by dmp() ?
Recent: wet_haystack ׀ Popular: wet_slimpattern ׀ Handy: wet_quicklink | Me
Offline
OK, it didn’t output anything. I know my field name is correct. I’m not sure what else to check.
Edit: wet, you were right, it is outputting the permlink for the article rather than the link I am after.
Last edited by jrphelps (2006-08-21 19:23:24)
Offline