Extracting arguments from dynamic URLs I am new to Drupal 7 and am trying to do the following:

1) I have a node that's aliased to domain.com/inventory - the node has code that'll generate dynamic content.

2) My site creates dynamic URLs like domain.com/inventory/ABCD and I need to know how to a) figure out that I'm on the /inventory page and b) extract the argument "ABCD" from the URL.

Can you please help me?
If your node is 12, your internal path is node/12 when the alias is 'inventory'. In that case arg(0) gives you 'node' and arg(1) gives you '12'.

In the case of dynamic URLs like inventory/ABCD, I assume that the internal path is 'inventory/ABCD' (so that inventory/ABCD does not have anything to do with node 12). Then arg(0) gives you 'inventory' and arg(1) gives you 'ABCD'.