> For the complete documentation index, see [llms.txt](https://docs.toomuchmedia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.toomuchmedia.com/nats-admin/skins-and-templates/further-reading/template-functions/nats_get_loginid_from_campaignid.md).

# nats\_get\_loginid\_from\_campaignid

*Article Topics:* [*Smarty*](/getting-started/common-topics/smarty.md)*,* [*Customization*](/getting-started/common-topics/customization.md)

## Parameters

(*Required parameters in **bold**)*

| Parameter      | Description                                   | Possible Values                | Default Value                                          | Example                           |
| -------------- | --------------------------------------------- | ------------------------------ | ------------------------------------------------------ | --------------------------------- |
| **campaignid** | **The campaignid you wish to translate**      | **Any valid number**           | **0**                                                  | **campaign=234**                  |
| store\_var     | the variable you wish to store the loginid in | any valid smarty variable name | blank (loginid will be outputted directly to template) | store\_var="my\_special\_loginid" |

## Output

If store\_var is set, then the function will store the corresponding loginid to that variable. Otherwise, the function will simply return the loginid onto the template itself.

## Notes

If an invalid campaignid is passed into the function, the result will always be 0.
