Wiccle.com in Facebook Wiccle.com in Twitter Wiccle.com in LinkedIn Wiccle.com in Youtube RSS from Wiccle.com Wiccle.com in Atom
 
 
 

Thread: How do I use the "Parameters" field in Page Builder?

Started: February 2, 2010, 07:34 AM  ⋅  Zone: Public Forums  ⋅  Category: FAQ  ⋅  Posts: 4  ⋅  Views 559
Started by: john  ⋅  Description: No description.
Post #1
Member: john  ⋅  Date: February 2, 2010, 07:34 AM  ⋅ Subject: "How do I use the "Parameters" field in Page Builder?"

For me, one of iWiccle's biggest features is its Page Builder. It's one of those things which demand more 'fiddling with' once you get started. It's powerful stuff!

With the release of 1.20, Page Builder has additional features. The new mix of column/row based content boxes is nothing short of awesome!

There's a new box called 'Parameters' which warrants further explanation (I'm sure I could use it - if I knew how...).

Markus, when you are able, could you write a few lines (and maybe give a few examples) on the use of 'Parameters'. Is this something for advanced users or could a 'newbie' (like me) use it?

Barrels of thanks. Smile

Post #2
Member: Markus  ⋅  Date: February 2, 2010, 05:27 PM  ⋅ Subject: "Re: How do I use the "

The column/row mix option has actually been there since 1.11. Cool

Unit and Layout parameters can be filled in up to 65K characters, defined and separated with the following syntax:

unit_sql_limit=24; unit_order=name_desc; unit_format=post_huge;

A colon ; is used for separating names and values, equal sign = is used as the defining operator.

There are at least two key things you can use it for. Application one is for supplying per-unit parameters to your custom functions. In this case, the ongoing unit's data is available in global scope under $cache['current']['unit'] as an associative array corresponding to the unit's database fields plus the supplied parameters.

As a case example, there may be a situation where want to check the current unit's SQL limit or template base in your post_preprocessor() function when you parse the data into dynamic templates, to modify the raw data. (This is used for example in producing "System Header" for units from posts with SQL limit 1.) This is more of a developer goodie to help connect other areas of code with the templating system.

Application two is for overriding the default fields that are available in the dropdowns. For example, if you wanted have 16 members displayed on your front page instead of one of the preset options (1, 5, 10 etc.), you could add unit_sql_limit=16 to your parameters.

Below is a screenshot of the fields in the w_units table. You can look it up in your MySQL database to understand better the correlation of what's in the builder with what's in your raw data. You can override all but the ID field using the parameters field of Wiccle Builder.

Unit Table Fields

Post #3
Member: john  ⋅  Date: February 2, 2010, 05:44 PM  ⋅ Subject: "Re: How do I use the "

Thanks for the explanation Markus. Think I'll stay away from Parameters! Undecided

Post #4
Member: Markus  ⋅  Date: February 2, 2010, 06:26 PM  ⋅ Subject: "Re: How do I use the "

It's more of a developer thing, and for some more advanced dynamic content stuff.

The only parameter you may want to use on occasion is the unit_sql_limit to define a custom amount instead of what's available in the dropdown. This is for example how our demo shows 24 members on the front page.

 

FAQ

Add to Favorites
Public Forums
Category  ⋅  Frequently asked questions on all things Wiccle. If it's a common question, see here.
 

Public Forums

Add to Favorites
Public Forums
Zone  ⋅ Public forum sections for support and discussions. Available for everyone.
 

Zone Categories

 
Questions? Ask us!
Back to Top