Skip to Content Skip to Menu

Assign a CB Auto Action to one specific page?

55 minutes ago #343918 by BobBriscoe
Replied by BobBriscoe on topic Assign a CB Auto Action to one specific page?
Having set Location: footer, no indication that the script ran and, in the source of the assigned page, the JS still doesn't appear in the head.
I also tried Advanced > Module Style: None, but that didn't change anything either.

I tried it with and without <script> tags around the javascript (I assume it's meant to be without, but it' not clear which).

For the avoidance of doubt, I've provided hyperlinks to screen shots of all the CB Content config, with pink boxes around non-defaults. (I would've attached but the uploads all failed):
oldwaydogfields.co.uk/tmp/ScreenshotFrom2026-05-15_23-05-53.png
oldwaydogfields.co.uk/tmp/ScreenshotFrom2026-05-15_23-06-48.png
oldwaydogfields.co.uk/tmp/ScreenshotFrom2026-05-15_23-07-02.png
oldwaydogfields.co.uk/tmp/ScreenshotFrom2026-05-15_23-07-39.png
oldwaydogfields.co.uk/tmp/ScreenshotFrom2026-05-15_23-07-32.png

____________

Custom Value: [cb:url location="current" /]
Operator: Ends With
Value: /booking-menu

Is this really equivalent to JS: window.location.pathname.endsWith('/booking-menu') ? or does the CB match the end of the URL, whereas the JS matches the end of the pathname within the URL (ignoring query string and/or fragment - which is what I want)?
 

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum