Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2007-03-30 19:58:30
- unipus
- Member
- Registered: 2004-03-10
- Posts: 18
Re: Linking to common custom tag
Wait, hold on… I don’t know what’s up but I think it’s working now.
Last edited by unipus (2007-03-30 19:59:40)
Offline
#14 2007-03-31 00:05:59
- unipus
- Member
- Registered: 2004-03-10
- Posts: 18
Re: Linking to common custom tag
Actually, I was wrong… I had reverted to old code using the CreatedBy custom field… so, no, it’s still throwing the error above. Using this exact code:
<txp:asy_wondertag><txp:permlink id="<txp:custom_field name="CreatorArticleID" />"><txp:article_custom id="<txp:custom_field name="CreatorArticleID" />" form="creator_name" /></txp:permlink></txp:asy_wondertag>
Offline
#15 2007-03-31 10:43:14
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Linking to common custom tag
This is in your article form, right? And what is the html output?
Edit: maybe we need to repeat the asy_wondertag, because ‘tags in tags’ are now used twice. Try if this makes a difference:
<txp:asy_wondertag><txp:permlink id="<txp:custom_field name="CreatorArticleID" />"></txp:asy_wondertag><txp:asy_wondertag><txp:article_custom id="<txp:custom_field name="CreatorArticleID" />" form="creator_name" /></txp:permlink></txp:asy_wondertag>
Last edited by els (2007-03-31 10:48:40)
Offline
#16 2007-04-03 01:01:13
- unipus
- Member
- Registered: 2004-03-10
- Posts: 18
Re: Linking to common custom tag
Hmm… that returns no errors, but also returns nothing at all. Checking the source code: nothing generated at all, not even an empty link.
Offline
#17 2007-04-03 13:28:45
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Linking to common custom tag
Well, the error will probably disappear when you switch to live mode. But if it’s not working properly…
Can you go back to my original code and post a tag trace?
And can you answer my question: you did put this code in an article form, right?
Offline
#18 2007-04-03 19:23:28
- unipus
- Member
- Registered: 2004-03-10
- Posts: 18
Re: Linking to common custom tag
Actually, you’re right… it was on a Link form. But now I’ve changed it to article and it’s made no difference.
Here’s the tag trace just for one instance of the relevant portion: if you want the full thing, I can post that too, but it’s lengthy. I think I’ve got everything here but obviously you’d know better than I…
<txp:output_form form="nav" />
[SQL (0.002434): select Form from txp_form where name='nav']
[Form: nav]
<txp:article_custom form="link_nav_movie" category="movies" limit="5" sortby="rand()" sortdir="desc" />
[SQL (0.004314): select *, unix_timestamp(Posted) as uPosted from textpattern where 1 and Status = 4 and Posted <= now() and ((Category1='movies') or (Category2='movies')) order by rand() desc limit 0, 5]
[SQL (0.001114): select Form from txp_form where name='link_nav_movie']
[Form: link_nav_movie]
[article 2]
<txp:permlink/>
<txp:title/>
<txp:title/>
<txp:asy_wondertag>
<txp:custom_field name="CreatorArticleID" />
<txp:permlink id="15">
[SQL (0.003665): select *,ID as thisid, unix_timestamp(Posted) as posted from textpattern where ID=15]
<txp:article_custom id="<txp:custom_field name="CreatorArticleID" />
[SQL (0.007188): select *, unix_timestamp(Posted) as uPosted from textpattern where 1 and Status = 4 and Posted <= now() order by Posted desc limit 0, 10]
[SQL (0.003417): select Form from txp_form where name='default']
[Form: default]
[article 36]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:if_article_section name="movies">
[<txp:if_article_section name="movies">: false]
</txp:if_article_section>
<txp:body/>
<txp:if_article_section name="news">
[<txp:if_article_section name="news">: false]
</txp:if_article_section>
[article 35]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:if_article_section name="movies">
[<txp:if_article_section name="movies">: false]
</txp:if_article_section>
<txp:body/>
<txp:if_article_section name="news">
[<txp:if_article_section name="news">: false]
</txp:if_article_section>
[article 34]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:if_article_section name="movies">
[<txp:if_article_section name="movies">: false]
</txp:if_article_section>
<txp:body/>
<txp:if_article_section name="news">
[<txp:if_article_section name="news">: false]
</txp:if_article_section>
[article 33]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:if_article_section name="movies">
[<txp:if_article_section name="movies">: false]
</txp:if_article_section>
<txp:body/>
<txp:if_article_section name="news">
[<txp:if_article_section name="news">: false]
</txp:if_article_section>
[article 32]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:if_article_section name="movies">
[<txp:if_article_section name="movies">: false]
</txp:if_article_section>
<txp:body/>
<txp:if_article_section name="news">
[<txp:if_article_section name="news">: false]
</txp:if_article_section>
[article 31]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:if_article_section name="movies">
[<txp:if_article_section name="movies">: false]
</txp:if_article_section>
<txp:body/>
<txp:if_article_section name="news">
[<txp:if_article_section name="news">: false]
</txp:if_article_section>
[article 30]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:if_article_section name="movies">
[<txp:if_article_section name="movies">: false]
</txp:if_article_section>
<txp:body/>
<txp:if_article_section name="news">
[<txp:if_article_section name="news">: false]
</txp:if_article_section>
[article 29]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:if_article_section name="movies">
[<txp:if_article_section name="movies">: false]
</txp:if_article_section>
<txp:body/>
<txp:if_article_section name="news">
[<txp:if_article_section name="news">: false]
</txp:if_article_section>
[article 28]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:if_article_section name="movies">
[<txp:if_article_section name="movies">: false]
</txp:if_article_section>
<txp:body/>
<txp:if_article_section name="news">
[<txp:if_article_section name="news">: false]
</txp:if_article_section>
[article 27]
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:if_article_section name="movies">
[<txp:if_article_section name="movies">: false]
</txp:if_article_section>
<txp:body/>
<txp:if_article_section name="news">
[<txp:if_article_section name="news">: false]
</txp:if_article_section>
</txp:permlink>
</txp:asy_wondertag>
[article 5]
(edit: changed bq.. to bc.. -Els)
Last edited by els (2007-04-03 21:23:29)
Offline
#19 2007-04-03 19:24:05
- unipus
- Member
- Registered: 2004-03-10
- Posts: 18
Re: Linking to common custom tag
Not sure what happened to the line breaks there, using bq..
Offline
#20 2007-04-03 21:50:50
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Linking to common custom tag
Did you create the form ‘creator_name’, like in my example here? I don’t see it anywhere in the code.
The tag trace doesn’t seem to be quite right, but I’ll know more if you post your complete form ‘link_nav_movie’.
Offline
#21 2007-04-03 22:52:56
- unipus
- Member
- Registered: 2004-03-10
- Posts: 18
Re: Linking to common custom tag
link_nav_movie:
<li><a href=”<txp:permlink />” title=”<txp:title />” class=“movietitle”><txp:title /></a> by
<txp:asy_wondertag><txp:permlink id=”<txp:custom_field name=“CreatorArticleID” />”><txp:article_custom id=”<txp:custom_field name=“CreatorArticleID” />” form=“creator_name” /></txp:permlink></txp:asy_wondertag>
</li>Also, yes, creator_name definitely exists as an article form:
<txp:title />
Offline
#22 2007-04-04 16:39:15
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Linking to common custom tag
Okay, in the plugin thread I found that <txp:asy_wondertag>
should be wrapped around only one tag. So let’s try if this works:
<li>
<a href="<txp:permlink />" title="<txp:title />" class="movietitle"><txp:title /></a> by
<txp:asy_wondertag>
<txp:permlink id="<txp:custom_field name="CreatorArticleID" />">
</txp:asy_wondertag>
<txp:asy_wondertag>
<txp:article_custom id="<txp:custom_field name="CreatorArticleID" />" form="creator_name" />
</txp:asy_wondertag>
</txp:permlink>
</li>
(I just put some line breaks in for a better overview, you don’t have to do that of course.)
Offline
#23 2007-04-04 20:21:34
- unipus
- Member
- Registered: 2004-03-10
- Posts: 18
Re: Linking to common custom tag
Huh… well this is interesting. It’s working, except it’s not generating the link. AND, it’s outputting the closing permlink tag in the html. But looking at it, I can’t see any sort of error in syntax. And TXP/PHP doesn’t seem to be throwing any complaints about it.
So we have the correct text, but no link whatsoever. Close!
I really appreciate you sticking with this.
Offline
#24 2007-04-04 20:57:44
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Linking to common custom tag
Can you give me the html output?
Offline