> 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.toomuchmedia.com/nats-admin/skins-and-templates/further-reading/template-functions/nats_get_loginid_from_campaignid.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
