Template Caching Variables?
Posted: 10 June 2008 06:23 PM   [ Ignore ]  
Grad Student
Rank
Total Posts:  73
Joined  09-27-2007

Here’s a summarised version of our issue.

We have a plugin that pulls various fields out of a query.

They are then pushed to the template via this method - for example, for author name.

$tagdata = $TMPL->swap_var_single($key, $row[‘author’], $tagdata);

Then our template code for example is:

{exp:entrylinks orderby=“latest” weblog=”{my_weblog}” parse=“inward”}
{author}
{/exp:entrylinks}

Unfortunately, when this returns multiple rows, and multiple authors, the Author name will not change.

e.g. if our result set is Jim, Harry, Jim, Ben

EE will output

Jim, Jim, Jim, Jim

Is there a method of variable flushing or something like that, which has been overlooked?

Moved to Plugins: Technical Assistance by Moderator

Profile
 
 
Posted: 10 June 2008 06:53 PM   [ Ignore ]   [ # 1 ]  
Grad Student
Rank
Total Posts:  73
Joined  09-27-2007

Found the issue, it appears EE doesn’t like the use of custom plugins messing with the {author} template variable.

Changing the variable to {entry_author} has fixed it.

Profile
 
 
Posted: 10 June 2008 06:53 PM   [ Ignore ]   [ # 2 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12377
Joined  04-29-2002

Hi, Andrew. This question is more of a programming question than a technical support question, so I moved it.

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64909 Total Logged-in Users: 42
Total Topics: 81855 Total Anonymous Users: 26
Total Replies: 440069 Total Guests: 215
Total Posts: 521924    
Members ( View Memberlist )