Giter VIP home page Giter VIP logo

Comments (5)

danrot avatar danrot commented on August 24, 2024

After a discussion with @chirimoya we came up with the following (new) solution:

We will add the opportunity to add tags to the template properties:

<property name="title" type="text_line" mandatory="true" tags="sulu.node.name,sulu.rlp.part:1"/>

That means that the tags are saved in the template structure along with the property, and the Structure-Class has some methods to return all the properties with a given Tag.

The XMLFileLoader has check if there is one property with the sulu.node.name-tag, and reject the configuration file with a warning, if there is none.

Tags should be namespaced as in the example, so that we don't get troubles with eventually usage of this feature in client projects.

Tags should also be able to receive a priority, like the sulu.rlp.part-tag in the example. The syntax for that would be tag:priority, where tag is a text (without comma, as it is the delimiter for tags) and the priority a number. The one using the tag can decide for what the priority is used (only use the property with a value and the highest priority on this tag, or use all of them and use the priority for sequencing).

Sulu will then never again ask hardcoded for the title-attribute anywhere, but use the structure to get the fields with the given tag instead.

from sulu.

chirimoya avatar chirimoya commented on August 24, 2024

+1

from sulu.

wachterjohannes avatar wachterjohannes commented on August 24, 2024

+1

from sulu.

wachterjohannes avatar wachterjohannes commented on August 24, 2024

for better readability:

<property name="title" title="properties.title">
<tag name="sulu.node.name" />
</property>
<property name="url" title="properties.url">
<tag name="sulu.rlp.part" />
<tag name="sulu.node.name" priority="10" />
</property>

@danrot @chirimoya

from sulu.

danrot avatar danrot commented on August 24, 2024

+1

from sulu.

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.