Extra information on layer for output to JSON?« Back to Questions List

What is the best way to export some extra/custom information about a particular layer to the JSON file?

Asked by harry8888
Added June 22, 2016 3:23 am

This question has been resolved, view the correct answer now!

Correct Answer

Update 2017

JSON and XML now have many updates to support most properties found in your layer when using Inline Code.

Read the Online Tutorial for more details.

Answer by admin
Answered On February 26, 2017 3:18 am #

Sorry…can NOT get the ${p} to work.

Could someone explain it more?

Answer by harry8888
Answered On June 30, 2016 4:52 am #

can get the ${p} to work.
I changed the text layer name to ”${p}name”.
is it the right way?

Answer by harry8888
Answered On June 30, 2016 12:05 am #

Hi,

There is a new Lightning Storm release with many JSON and XML updates. Take a look at our tutorial to see the new features: //exportkit.com/plugin/environments/xml/convert-a-psd-to-xml-and-json.

1. Vector support
2. ${p} tag support for text styles
3. Inline Code support for raw Photoshop layer effects

Try the new layer effects support for Photoshop when you use Inline Code/Content – it now provides ALL layer effects and properties!

Answer by admin
Answered On June 28, 2016 5:17 pm #

Hi,

This sound very much like a new layer tag / feature request.

Passing custom values: Normally we reserve this for Text layers, but your description sounds more like a custom layer type property.  This would require a new layer tag to allow you add a prop and value to your JSON/XML output.
Link to another layer: There are plans to add ${link} tag support, but this is mainly for anchors and url links.  You could re-purpose the url address as anything, eg. a layer name as in your description.  It would be up to the developer how they want to use the information.

Send us a feature request (be descriptive) for Passing custom values: //exportkit.com/contact – we will ask Dev if link tag for JSON/XML is included in next release.

Answer by admin
Answered On June 23, 2016 1:46 pm #

also, I need a text field which ”link” to another layer name so the JS can manipulate the other layers.

Answer by harry8888
Answered On June 23, 2016 12:21 am #

For example, layer1 need to be passed a number 2, layer2 need to be passed a number 8 to the JSON file, the JS script is doing something different based on the number.

Answer by harry8888
Answered On June 22, 2016 11:55 pm #

Hi,

${p} tag is planned for the next release (no set date yet), this will provide a new property for text elements:

"htmlText":"My <span style=\"font-weight:bold;\">html</span> text"

Are you also requesting a unique id for elements?

Answer by admin
Answered On June 22, 2016 3:15 pm #

how to use the ${p}?
when will it be there?

Answer by harry8888
Answered On June 22, 2016 1:49 pm #

just a magic number for different layer to use in json/js

Answer by harry8888
Answered On June 22, 2016 1:48 pm #

Hi,

The only way at the moment is Inline Code with additional Text info. We have a lot of information that we can provide, but the plugin was originally designed to provide commonly used info. We now realized customers use our plugin for everything.

Our next release (json/xml features):

${p} tag support, this will give you html text.
vector/svg support

Let us know what information you are looking for and we can pass it to Dev.

IMPORTANT:

Photoshop +others have A LOT of properties that do not work well outside of Adobe – but we can provide them.

Answer by admin
Answered On June 22, 2016 12:52 pm #
Looking for another answer? View other questions in General or get premium support for guaranteed results.
Asked by harry8888
1641 views
11 answers
Last Answered 8 years ago by admin

Categories

Recent Answers

asked by Adith
asked by Sander
asked by bps9191980
asked by admin
asked by anup-sarkar
asked by originalife07
asked by yudhis
asked by lafejol
asked by lafejol
asked by rihabbenhmida
asked by zaineb khiari
asked by nmax
asked by shanrt
asked by Ali Sodikin
[+] View All Recent Questions

Share Your Knowledge!

Contribute to the community and help other users to benefit from your answer with experience and knowledge.