EllisLab text mark
Advanced Search
     
A possibly moronic question about setting parameters
Posted: 04 May 2012 06:12 AM   [ Ignore ]
Joined: 2005-10-07
45 posts

To help my less-than-tech-savvy colleagues who occasionally have to edit templates, I want to be able to set a variable at the top of a template (or somewhere else) defining the number of days that a weblog:entries tag will pull through. That will save them wading through code, I hope. I hoped I could do it with a global variable, but that didn’t seem to work.

So, it would be:

variable = X;

{exp:weblog:entries weblog=“site” display_by=“day” limit=”{x}”}

 
Posted: 04 May 2012 08:05 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2002-12-06
4251 posts

Sounds like a good use for http://expressionengine.com/legacy_docs/templates/globals/assign_variable.html

 Signature 

Get the missing EE2 owner’s manual - a complete guide to building an EE2 site.  It’s available in PDF or print.

 
Posted: 04 May 2012 03:58 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2011-11-25
7174 posts

Hey Rob,

Thank you for posting your question here on the ExpressionEngine forums.

Can you give Mike’s suggestion a try?

Thank you,

 Signature 

Recent version: EE 2.5.4 | Forum Module 3.1.10 | MSM 2.1.4 | 2.x Bug Tracker | Version Upgrade