Passing flags from plugins to templates
Posted: 05 October 2007 02:43 PM   [ Ignore ]  
Lab Assistant
RankRank
Total Posts:  127
Joined  10-27-2006

Hey folks, I think this might be a ‘its friday and my brain has turned off’ kind of problem but we’ll see.

Situation: We’re using the Simple Pagination plug to paginate our stories. It works great for us for basic pagination. But we want more (always more!). I’d like to set a flag inside the template that indicates that the story is being paginated. Then, in the article template, we want to check that flag to suppress or add various page parts (some things we only want on Page 1 of a story, some things only on the last page).

My problem is getting that flag out to the template… I suspect (after searching these forums) that $SESS->cache is part of my solution; I can set a parameter in that and then read it in the template? But so far I haven’t hit on the right way to do that.

Can someone give me a whack on the side of the head to get me moving on this again?

Profile
 
 
Posted: 28 November 2007 02:34 PM   [ Ignore ]   [ # 1 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1330
Joined  02-12-2003

Pete. 

I’m going to need a lot more detail to know where to even start with this.

What does the template look like?  What does an entry look like that has multiple pages?  Each page is a custom field?  What do you mean various parts of the page should only show on page 2?

Give me some more details and I’ll see how I can help.  smile

Jamie

Profile
 
 
Posted: 28 November 2007 03:45 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
RankRank
Total Posts:  127
Joined  10-27-2006

Hi Jamie,

I appreciate the effort, but this is a problem from more than 2 months ago. Suffice to say my overlords aren’t quite that patient when it comes to solutions. smile

We ended up axing the feature that required this.

Profile
 
 
Posted: 28 November 2007 04:05 PM   [ Ignore ]   [ # 3 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1330
Joined  02-12-2003

Should have looked at the date.  Dang.  Well thankfully I wasn’t assigned to handle this forum at that point.  So I’m not quite as ashamed at my response time as I would have been.

For future reference I’m assigned checking out the dev forums in a more regular manner than they have been dealt with before.  So next time you should get a response in a more timely manner.

Still if its ever pressing if you hit the technical support forum with a question you should get an answer quickly.  And especially with this problem I think it may have been solvable with url_segments rather than any special hack.

Jamie

Profile
 
 
   
 
 
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: 65026 Total Logged-in Users: 43
Total Topics: 82115 Total Anonymous Users: 19
Total Replies: 441304 Total Guests: 196
Total Posts: 523419    
Members ( View Memberlist )
Newest Members:  meenoiYang.JianuoioitsukiNathan HammondalexcigadamstaneckiLucas Mayscybermilltstitt