Home Download Buy Blog Forum Support

Snippet <-> Project Settings

Snippet <-> Project Settings

Postby Horttcore on Sun Apr 21, 2013 5:55 pm

Hi there,

is there a way to read a project setting from within a snippet?

Here is my example…

In WordPress you use textdomains to translate strings
Code: Select all
__( 'string to translate', 'textdomain' );

This textdomains changes in every project

I use a
Code: Select all
__
as a tab triggered snippet to call this
Code: Select all
__( '${1:String}', '${2:Textdomain}' );

It would be cool to read the project properties so I only have to define the textdomain once.

Also it would be cool to transform a mirrored user input
Code: Select all
<label for="{$1:strtolower}">$1</label><input name="{$1:strtolower}" id="{$1:strtolower}" value="$2 placeholder="$3"">


Cheers Ralf
Horttcore
 
Posts: 1
Joined: Thu Jun 07, 2012 11:53 am

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], soapybirds and 10 guests