We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Passing flags from plugins to templates

Development and Programming

Pete Smith's avatar
Pete Smith
91 posts
17 years ago
Pete Smith's avatar Pete Smith

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?

       
Jamie Poitra's avatar
Jamie Poitra
409 posts
17 years ago
Jamie Poitra's avatar Jamie Poitra

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. 😊

Jamie

       
Pete Smith's avatar
Pete Smith
91 posts
17 years ago
Pete Smith's avatar Pete Smith

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. 😊

We ended up axing the feature that required this.

       
Jamie Poitra's avatar
Jamie Poitra
409 posts
17 years ago
Jamie Poitra's avatar Jamie Poitra

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

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.