Add extension in the navbar

Hi,
Using SuiteCRM-8.7.1-dev
I need to create a new extension as a custom button in the navbar.

  • I tried making changes in the base-navbar.component.html file, but after rebuilding, nothing was updated on the SuiteCRM site. Is it not possible to make changes in this part, or is there a different way to do it?

  • In the default extension, we have <scrm-widget-panel></scrm-widget-panel>. Where can I find the full list of available tags? I need to add something like a button or a similar element.

I don’t think this actually needs to be declared, you can just go ahead and use your own tag (if I am not mistaken):

Targets
    Occurrences of 'scrm-widget-panel' in Project
Found occurrences in Project  (9 usages found)
    Unclassified  (8 usages found)
        Suite8  (8 usages found)
            core/app/core/src/lib/containers/sidebar-widget/components/chart-sidebar-widget  (2 usages found)
                chart-sidebar-widget.component.html  (2 usages found)
                    28 <scrm-widget-panel [title]="this.title" *ngIf="(vm$ | async) as vm">
                    71 </scrm-widget-panel>
            core/app/core/src/lib/containers/sidebar-widget/components/history-sidebar-widget  (2 usages found)
                history-sidebar-widget.component.html  (2 usages found)
                    28 <scrm-widget-panel [title]="getHeaderLabel()">
                    122 </scrm-widget-panel>
            core/app/core/src/lib/containers/sidebar-widget/components/record-thread-sidebar-widget  (2 usages found)
                record-thread-sidebar-widget.component.html  (2 usages found)
                    28 <scrm-widget-panel [mode]="panelMode" [title]="getHeaderLabel()">
                    42 </scrm-widget-panel>
            core/app/core/src/lib/containers/sidebar-widget/components/statistics-sidebar-widget  (2 usages found)
                statistics-sidebar-widget.component.html  (2 usages found)
                    28 <scrm-widget-panel [title]="getHeaderLabel()">
                    34 </scrm-widget-panel>
    Usage in string constants  (1 usage found)
        Suite8  (1 usage found)
            core/app/core/src/lib/components/widget-panel  (1 usage found)
                widget-panel.component.ts  (1 usage found)
                    32 selector: 'scrm-widget-panel',

Classic HTML allows the use of any tag. I think HTLM% has restrictions but that’s probably beside the point here - you use your tag, reference it where you need it, and that should be ok.

Try it and tell me if I’m mistaken :slight_smile:

Hi,
If you review the first part of my question, I already tried this, but none of the changes are reflected.

So maybe there is another command to rebuild the project after making changes in the folder?
core\app\core\src\lib\components\navbar\base-navbar

OR maybe you simply need to run clear symfony cache command and Empty cache and hard reload on the browser. :face_with_peeking_eye:

Clear Symfony cache:

php bin/console cache:clear

Yes, this is what I did, removed all cache folder contents manually, ran php bin/console cache:clear command, and refreshed the browser with a hard reload.

Maybe you will find something helpful here:

Which command did you use to rebuild? I assumed you had rebuilt everything, but maybe not.

There’s core, common, shell and defaultExt to rebuild, depending on what you change.

1 Like

Run the Build Commands Sequentially: Build the frontend common, core, and shell packages in the specified order. Execute the following commands one by one:

yarn run build:common
yarn run build:core
yarn run build:shell

Here’s a brief explanation of what each command does:

  • yarn run build:common: This command builds the common package, which likely contains shared components, utilities, or libraries used across other parts of your project.
  • yarn run build:core: This command builds the core package, which is essential for the main functionality of your project.
  • yarn run build:shell: This command builds the shell package, which may contain the main application shell or entry point for your project.
2 Likes

Yes, this is working. Thank you all!