Global/reusable buttons/table views

Is there a way to create a button, table view or any other component and reuse it on different pages?

I know it’s possible to copy any element in Coda, I’m asking about reusing the same component in different places. So if the settings for that component are changed in one place, they will be changed for any instance of that component.

Dear @Andrei_Kharlanov, welcome to the community :handshake:

With named formulas you will be able to do so.

Then it’s mostly up to the maker’s creativity to get the most out of it. :building_construction:

1 Like

Hi @Andrei_Kharlanov and welcome to the Coda Community!

I’ve been meaning to create a public sharable version of the “Global Blocks” system I’ve created for our internal use. Your question helped me finally get that done today.

Here is how I’ve created what I call “Global Blocks” to manage Button Labels, Blocks (footers, larger text blocks, etc.) and Variables (Links, short text content, etc.)

You should be able to copy this Doc to your own account to play with and expand upon it.

Please LMK if you have any questions.

1 Like

You can have a table with controls, e.g. buttons. Then making (copying) a view of that table on multiple pages will give you the rendering of the same controls. You can configure it from any page, and it will be reflected on other pages.

With canvas controls you cannot do that.

You also cannot have a pair of table views where adjusting the filter/sort/columns/etc of one view would automatically change the same on the other view.

1 Like

I’ve used the trick @Paul_Danyliuk mentioned here and then in the table options, turn off things like “Show grid lines” to clean it up. Looks just like a canvas button and like Paul mentioned, with views its repeatable throughout the doc.

1 Like

Thank you for the suggestion, @Jean_Pierre_Traets! I see how I can use named formulas for some of this, but it doesn’t solve all the problems.

For example, if I want to place a button with the named formula, I still need to configure the text and colour for the button every time.

The solution that @Shane_Robinson shared can solve it in a way, but you still need to use named formulas and pull the text from the table for each button every time.

Thank you, @Paul_Danyliuk!

Yeah, canvas controls and table views that change on every page they are placed are another blocks I’d like to reuse :confused:

Thank you so much for sharing this doc, @Shane_Robinson! Your solution can do a lot!

But for me it’s a bit strange that makers need to jump though so many hoops to build reusable blocks in Coda.

We have named formulas, will be great to have named buttons, table views etc.

Maybe someone from Coda team can comment if they considered this functionality for future releases? Should I post to the suggestion box forum about it, what do you think?

Thanks @Andrei_Kharlanov and I completely agree it’s too many steps to do what could/should be native. Especially buttons! Since we already have named formulas, and we can name buttons… Why can’t we:

  1. Given a button named “b_AddContact
  2. Type ‘=b_’ and when selecting “b_AddContact” from the list, reproduce that same button instead of initiating a formula action?

Of if that is too technically difficult based on how “=” is integrated with the formula modal, introduce a new activator character… Perhaps “****” because it’s not currently mapped to an action and would rarely, if ever, be used in general content creation and editing.

Yes absolutely post in the Suggestion Box!