Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to access id of item in lense #155

Open
white-gecko opened this issue Jan 31, 2016 · 0 comments
Open

Not possible to access id of item in lense #155

white-gecko opened this issue Jan 31, 2016 · 0 comments

Comments

@white-gecko
Copy link

I want to access the data filed id of an item in a lense, but it is empty.

If I take the flag demo and change the the .code to .id in the lense, I get nothing.

https://github.com/simile-widgets/exhibit/tree/master/scripted/demos/flags

<div data-ex-role="lens" style="display: none;" class="map-lens">
    <div class="flag-container">
        <img data-ex-src-subcontent="http://upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Flag_of_{{.label}}.svg/200px-Flag_of_{{.label}}.svg.png" alt="wikipedia flag image"/>
    </div>
    <div><b data-ex-content=".label"></b> [<span data-ex-content=".code"></span>]</div>
    <div>(Image from Wikipedia)</div>
</div>

change the third last line to

    <div><b data-ex-content=".label"></b> [<span data-ex-content=".id"></span>]</div>

is this the expected behavior? Is there any other way of accessing the id of an item?
(I know in this example the value of id is duplicated to code, but my source is bibsonomy json output and it has an id, which is not reproducible from any other field.

[EDIT] Actually in my case I found out, it is possible to reproduce the id from the other values, by doing concat('http://www.bibsonomy.org/bibtex/', .intraHash, '/', .user) or more precise concat('http://www.bibsonomy.org/bibtex/2', .intraHash, '/', .user)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant