Developer forum

Forum » Swift » customizing row issues

customizing row issues

Christoffer Rosendahl Frede
Reply

Hi everyone.

we have developed a few sites in swift and it seems like the row item structure seems to be tied really hard to columns. This makes it really hard to make a small change on the row item. in this use case i have now, i need to add a checkbox on the row item, adding a simple css to the row background image. how would i do that without needing to change all the 18 row items?

I could copy all the items and make the change, but i dont know if that is the way to go considering upgrading swift in the future.

so the question is how we  add a simple checkbox or some other simple item change without needing to replace all the swift row items ?

/best regards Christoffer

swift_row_items.png

Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Christoffer,
This is an issue we are currently facing as well.

With what you have available in Swift, currently, you cannot accomplish what you need without complicating the upgrade.

We have overcome this by creating an Item type and set all Rows to inherit it.

On that ItemType we have created a Group "Custom" and a property "Css rule".

If all rows inherit this Item, the group and property will show up on all of them.

Of course, it means that you have to remember to adjust all RowItemTypes from Swift before making the upgrade.

Your need makes sense to be turned into a Feature request.

Adrian

 
Nicolai Pedersen
Reply

Hi

Yes, this is what is currently doable. Not optimal but part of the game.

You can make css changes in custom css only without changing the item types. Of course if it is an additional row-setting, it is not possible.

What is the change you have made?

BR Nicolai

 
Tina Engelsen Pedersen
Reply

In this case, the parallax effect on the row background image is not going to be active all the time, but should be something that can be added on some rows. Christoffer and i have talked about that many things could be solved by being able to add a class in a textfield on the row, so we had a custom class to do styling for, without having to make copies of the row item types. This goes for the columns as well. 

Would it be possible that you could add a text field for adding custom classes on all row and column items, that add the class to the outer div of a row/column? Seems like a change that could solve many but not all customization needs? 

 
Nicolai Pedersen
Reply

Hi Tina

Yes - we will consider this as part of making it as easy as possible to customize Swift. Great with examples of what you need to extend so we understand the needs and can find a way to accomodate it.

BR Nicolai

 
Tina Engelsen Pedersen
Reply

You're welcome Nicolai :) 

If you only need to make custom styling for a row/element, but doesn't need to change anything else, the possiblilty to add a custom class would be really nice, so you could avoid making copies of both the template and item type.

 
Christoffer Rosendahl Frede
Reply

Or even better, it would be great if row wasnt tied so hard to columns, i am thinking like having a row item, with a list of columns, so that row is one item with x amount of columns. and even more better if a column could have settings for column width, so we only need 1 column item. that would be really nice :-)

 

You must be logged in to post in the forum