Dick van Straaten
Dick van Straaten

Reputation: 1

Q: Piranha CMS - System parameters

I have created some custom system parameters in the Piranha CMS Manager. I like to use those parameters in my code. How do I access these parameters from my code?

Upvotes: 0

Views: 100

Answers (1)

Håkan Edling
Håkan Edling

Reputation: 2753

The easiest way is to use the following static method:

var val = Piranha.Models.SysParam.GetByName(...);

This result of this method is also cached for performance.

Regards

Håkan

Upvotes: 1

Related Questions