PHPackages                             ride/web-template-smarty - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ride/web-template-smarty

ActiveLibrary

ride/web-template-smarty
========================

Smarty template integration for the base web application of the Ride framework

2.1.0(3mo ago)05.2k9MITPHP

Since Nov 29Pushed 3mo ago8 watchersCompare

[ Source](https://github.com/all-ride/ride-web-template-smarty)[ Packagist](https://packagist.org/packages/ride/web-template-smarty)[ RSS](/packages/ride-web-template-smarty/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (9)Versions (38)Used By (9)

Ride: Template (Smarty)
=======================

[](#ride-template-smarty)

This module adds template blocks, functions and modifiers for a Ride application to Smarty.

Block functions
---------------

[](#block-functions)

\[[Smarty docs](http://www.smarty.net/docs/en/plugins.block.functions.tpl)\]

### isGranted

[](#isgranted)

Parse block content if the specified route/url/permission is allowed.

ParameterTypeDescriptionrouteStringPath to check for allowance.urlStringURL to check for allowance.permissionStringPermission code to check for allowance.strategyStringAND or OR when checking more then one of the above checks.varStringVariable to assign the result to. (`true` if this block content will be printed, `false` otherwise)```
{isGranted permission="cms.node.varnish.manage"}
  ...
{/isGranted}
```

*Note: The content of this block is always rendered. If the content is used for logic, assign the grant to a var and use an if statement.*

### isNotGranted

[](#isnotgranted)

Parse block content if the specified route/url/permission is *not* allowed.

ParameterTypeDescriptionrouteStringPath to check for allowance.urlStringURL to check for allowance.permissionStringPermission code to check for allowance.strategyStringAND or OR when checking more then one of the above checks.varStringVariable to assign the result to. (`true` if this block content will be printed, `false` otherwise)```
{isNotGranted permission="cms.node.varnish.manage"}
  ...
{/isNotGranted}
```

*Note: The content of this block is always rendered. If the content is used for logic, assign the grant to a var and use an if statement.*

Template functions
------------------

[](#template-functions)

\[[Smarty docs](http://www.smarty.net/docs/en/plugins.functions.tpl)\]

### apiMethodParameters

[](#apimethodparameters)

```
{apiMethodParameters method= url= namespace= classes=}
```

### apiType

[](#apitype)

```
{apiType type= url= method= html= link= namespace= classes=}
```

### image

[](#image)

Return the URL of a transformed image.

ParameterTypeDescriptionsrcStringSource url or file for this image.defaultStringFallback for src parameter.transformationStringName of the transformation.varStringVariable name to assign this URL to.thumbnail---Deprecated⚠️ Transformations may require additional parameters.

For more information about the transformations and their parameters, check out [ride-lib-image](https://github.com/all-ride/ride-lib-image#transformation).

```
{image src=$content->image var='image' transformation='crop'}
```

### parsley

[](#parsley)

Adds parsley data attributes to the attributes of a form widget.

ParameterTypeDescriptiontypestringType of the form row widgetvalidatorsArrayValidators of a form rowvarStringVariable name to assign the updated attributes to.```
{$widget = $formRow->getWidget()}
{parsleyAttributes attributes=$widget->getAttributes() type=$widget->getType() var="attributes"}
```

### tableVars

[](#tablevars)

Add these FormTable variables to the template:

- `$tableNameField`
- `$tableActionField`
- `$tableIdField`
- `$tableOrderField`
- `$tableSearchQueryField`
- `$tablePageRowsField`

```
{tableVars}
```

### translate

[](#translate)

Translate a key using the i18n translator.

ParameterTypeDescriptionkeyStringTranslation key.localeStringTranslation locale.nIntegerNumber of items for a translation that describes multiple items.varStringVariable name to assign the translated key to.```
{translate key='label.submit' locale='nl'}
```

⚠️ When simply translating a key, using the `{$key|translate}` modifier syntax is preferred.

### url

[](#url)

Create an URL.

ParameterTypeDescriptionidStringRoute ID.parametersArrayPath arguments for the URL.queryArrayQuery parameters.separatorStringSeperator for query parameters. (defaults to `&`)varStringVariable name to assign the URL to.objectBooleanReturn URL Object instead of String. (defaults to `false`)```
{url id='api.search' var='searchUrl'}
```

Modifiers
---------

[](#modifiers)

\[[Smarty docs](http://www.smarty.net/docs/en/plugins.modifiers.tpl)\]

### decorate

[](#decorate)

ParameterTypeDescriptionStringID of the decorator.Common decorator IDs: `storage.size` / `time` / `date.format` / `file` / `file.extension` / `file.size`

```
{$content->data->getDatePublished()|decorate:'time'}
```

### safe

[](#safe)

Modify a string value to safely use it as a file name, URL, id etc.

```
{'Unsafe string!'|safe} {* result: unsafe-string *}
```

### translate

[](#translate-1)

ParameterTypeDescriptionArrayVariables to be replaced in the translation.```
{'label.fields.required'|translate}
```

Related Modules
---------------

[](#related-modules)

- [ride/app](https://github.com/all-ride/ride-app)
- [ride/app-image](https://github.com/all-ride/ride-app-template)
- [ride/app-template](https://github.com/all-ride/ride-app-template)
- [ride/app-template-smarty](https://github.com/all-ride/ride-app-template-smarty)
- [ride/lib-api](https://github.com/all-ride/ride-lib-api)
- [ride/lib-image](https://github.com/all-ride/ride-lib-i18n)
- [ride/lib-i18n](https://github.com/all-ride/ride-lib-i18n)
- [ride/lib-router](https://github.com/all-ride/ride-lib-router)
- [ride/lib-security](https://github.com/all-ride/ride-lib-security)
- [ride/lib-template](https://github.com/all-ride/ride-lib-template)
- [ride/lib-template-smarty](https://github.com/all-ride/ride-lib-template-smarty)
- [ride/web](https://github.com/all-ride/ride-web)
- [ride/web-api](https://github.com/all-ride/ride-web-api)
- [ride/web-security](https://github.com/all-ride/ride-web-security)
- [ride/web-template](https://github.com/all-ride/ride-web-template)

Installation
------------

[](#installation)

You can use [Composer](http://getcomposer.org) to install this application.

```
composer require ride/web-template-smarty

```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance80

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 65.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~127 days

Recently: every ~213 days

Total

36

Last Release

103d ago

Major Versions

0.6.0 → 1.0.02016-10-14

1.2.5 → 2.0.02024-04-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d98d3f0d5db5eb241c6ee74bcee87d1e7dc1aaf7942b933d68e612ee2352eea?d=identicon)[ride-user](/maintainers/ride-user)

---

Top Contributors

[![kayalion](https://avatars.githubusercontent.com/u/2340819?v=4)](https://github.com/kayalion "kayalion (56 commits)")[![kristofser](https://avatars.githubusercontent.com/u/5928907?v=4)](https://github.com/kristofser "kristofser (23 commits)")[![dduupp](https://avatars.githubusercontent.com/u/10728938?v=4)](https://github.com/dduupp "dduupp (6 commits)")

### Embed Badge

![Health badge](/badges/ride-web-template-smarty/health.svg)

```
[![Health](https://phpackages.com/badges/ride-web-template-smarty/health.svg)](https://phpackages.com/packages/ride-web-template-smarty)
```

###  Alternatives

[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[alajusticia/laravel-expirable

Make Eloquent models expirable

2193.4k5](/packages/alajusticia-laravel-expirable)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
