Skip to content

Change the background color of a specific replicator set header #7961

Answered by pixelikone
svennesvensson asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

the best way would certainly be to do the customization within the Vue-Components, here is a simple solution with JavaScript that does it.

In "app/Providers/AppServiceProvider.php" remove the comment for the script as described here: https://statamic.dev/extending/control-panel#adding-css-and-js-assets

Create the folder "public/vendor/app", create a subfolder "js" and create a file there named "cp.js". So the full path is "public/vendor/app/js/cp.js".

To format all set headers with the name "column", insert the following inside the "cp.js" file.

window.addEventListener("DOMContentLoaded", (event) => {
  // select all replicator labels on current page
  const replicatorLabels = docu…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@svennesvensson
Comment options

@sptv2reg
Comment options

Answer selected by svennesvensson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants