Giter Site home page Giter Site logo

Comments (3)

Schweriner avatar Schweriner commented on July 20, 2024

Did you enter the same value inside the files title and copyright? Then of course you get the same output.

title is the title of the image and copyright should be the copyright.

from tgm_copyright.

klodeckl avatar klodeckl commented on July 20, 2024

No, the file did not have a title.

This will output:
Copyright (© Copyright) (<f:if condition="{copyright.title}"> and <f:if condition="{copyright.copyright}">)

I changed the template to output the filename (and link to the image file because otherwise not every file was linked) instead:

<f:layout name="Default" />
    <f:section name="main">
    <f:if condition="{copyrights}">
    <ul>
      <f:for each="{copyrights}" as="copyright" iteration="iter">
          <li>
                  <f:if condition="{copyright.title}">
                        <f:then><f:link.page pageUid="{f:uri.image(src:copyright.originalResource.originalFile.properties.uid)}" target="_blank">{copyright.originalResource.properties.name}</f:link.page></f:then>
                    <f:else><f:link.page pageUid="{f:uri.image(src:copyright.uid,treatIdAsReference:1)}" target="_blank">{copyright.originalResource.properties.name}</f:link.page></f:else>
                </f:if>
            <f:if condition="{copyright.copyright}">
                <f:then>
                    (© {copyright.copyright})
                </f:then>
                <f:else>
                    (© {copyright.originalResource.properties.copyright})
                </f:else>
            </f:if>
        </li>
      </f:for>
    </ul>
</f:if>
</f:section>

from tgm_copyright.

Schweriner avatar Schweriner commented on July 20, 2024

What ever I do, I don't get the copyright when calling copyright.title. The cause of missing links was that also images of hidden or deleted pages were included, which has been fixed now. I'll try to upload a new version to TER today.

from tgm_copyright.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.