Use Current Menu Item and Current User Data in QCDR Tokens

QCDR Max/All Access dynamic-data Tokens can read selected properties of the current Joomla frontend menu item and the currently authenticated Joomla user. These values are resolved for the current request, so they can follow navigation and login state without hard-coding the data into the Token.

QCDR deliberately limits these providers: current-user data includes only the user's ID, display name, and username, and menu data is available only when the current frontend menu item is a published record accessible to that visitor.

Current Menu Item Sources

Under Current menu item, the Joomla data builder provides:

  • Current menu item ID
  • Current menu item title
  • Current menu item alias
  • Current menu item link

QCDR resolves the current Joomla menu ID from the request, verifies that the frontend menu record is published and accessible to the visitor, then reads the requested property. The current menu-link source produces a site-relative Joomla Itemid route for that menu item.

Current User Sources

Under Current user, choose the authenticated Joomla user's ID, display name, or username. These providers are intentionally unavailable for guests. QCDR does not expose password, session, authentication-token, or email providers through this builder.

If a guest reaches content containing a current-user Token, that dynamic source is unavailable. QCDR therefore preserves the authored Token placeholder or leaves a dependent Rule's original matched text unchanged rather than pretending a guest has an empty user identity.

Create the Token

  1. Create a Token and select Joomla content / dynamic data.
  2. Select a Current menu item or Current user source.
  3. Use Automatic output handling for normal IDs/names/titles/aliases; it produces escaped text. Current menu item link automatically uses URL-safe handling.
  4. For user-specific output, consider limiting the Token audience to logged-in users so its eligibility matches the provider's requirements.
  5. Save and test with the exact frontend menu route and user type that will consume the value.

Test Menu Context Carefully

Not every frontend request necessarily has the menu context you expect. Test the Token from direct URLs, alternate menu routes, multilingual menu items, and pages reached through redirects if those are relevant to your site. If no accessible current menu record is available, the menu-data Token does not resolve.

Privacy and Caching Considerations

Current-user values are request-specific personal page output. Do not place them on a page that is cached and shared across users unless the Joomla/site/CDN caching configuration varies that rendered response appropriately by user or session. A shared full-page cache can otherwise preserve personalized HTML after QCDR has rendered it.

Use the least identifying value needed for the page. User ID, display name, and username can still be sensitive in context even though QCDR does not expose broader profile or authentication data through this builder.

Verify Guest and Logged-In Behavior

Test once as a guest, once as an intended logged-in user, and—when menu data is involved—on both a matching menu route and a route without that menu context. Confirm that successful requests show the expected value and unavailable requests preserve authored content safely.


Community Discussion

Want to compare workflows, share practical tips, or discuss how you use this QCDR feature? Visit the QC Dynamic Replacer Community. For private support, bug reports, account-specific issues, or feature requests, use the QuantaCade support system.