SkillAgentSearch skills...

TimestampMacro

Adds n:src and n:href macros to Nette\Latte templating engine. These macros append timestamp as a parameter to path (e.g. main.js?512a45c4)

Install / Use

/learn @OndrejSlamecka/TimestampMacro
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Adds macros n:src and n:href

<script n:src="/main.js"></script>
<link n:href="style.css">

to produce code similar to

<script src="/main.js?512a45c4"></script>
<link href="style.css?512a45c4">

where 512a45c4 is timestamp which automatically changes when you modify the file (it is filesystem's mtime).

Please note that you don't have to & can't use {$basePath} with these macros because every path is constructed as $basePath . '/' . $fileName.

Install

$ composer require slamecka/timestamp:dev-master

In your config.neon

nette:
	latte:
		macros:
			- TimestampMacro

MIT license

View on GitHub
GitHub Stars5
CategoryDevelopment
Updated10y ago
Forks2

Languages

PHP

Security Score

55/100

Audited on Feb 23, 2016

No findings