Hi
I am new to MODX. I wish to find the chunk/locate the code to edit the alert bar on the top of this site.
Another person developed this before me.
Hi
I am new to MODX. I wish to find the chunk/locate the code to edit the alert bar on the top of this site.
Hey @aabraham, welcome to the community!
There could be multiple places where your alert bar comes from. I would suggest checking the template
of your page and see if there’s any chunks
embedded that could hold the alerts code. You can identify chunks by tags with a $
like [[$chunkname]]
.
Also have a look directly in your elements tree on the left and see if there’s any chunks for your header or navigation in general, as your alert appears on every page it’s quite likely the alert got placed in one of those.
Keep in mind, there are no general rules or naming conventions for elements, so that is entirely up to the (previous) developer, what those are called.
Thank you
Appreciate your response.
I could not trace it yet. Will keep digging
If you have access to the database with phpMyAdmin (or a similar tool), you could run an SQL query to search for the phrase “Happy New Year”.
-- Search in chunks
SELECT `id`, `name` FROM `modx_site_htmlsnippets` WHERE `snippet` LIKE '%Happy New Year%';
-- Search in templates
SELECT `id`, `templatename` FROM `modx_site_templates` WHERE `content` LIKE '%Happy New Year%';
-- Search in resources
SELECT `id`, `pagetitle` FROM `modx_site_content` WHERE `content` LIKE '%Happy New Year%';
-- Search in plugins
SELECT `id`, `name` FROM `modx_site_plugins` WHERE `plugincode` LIKE '%Happy New Year%';
-- Search in snippets
SELECT `id`, `name` FROM `modx_site_snippets` WHERE `snippet` LIKE '%Happy New Year%';