After some research surrounding this I can't seem to fix this issue. So for a project I made a simple module with some variables that simply has to make an OAuth1 call and return some data.

The provider of the website advised me to use :

<https://github.com/thephpleague/oauth1-client>

So in my module I initialised another composer.json and required the package above. It gets correctly installed to the vendor map in my module. However whenever I call the new OAuth() or new OAuth1() it can't be found.

I've tried adding it while using the packagepath in the top of my module.php as well as my moduleVariable.php but to no avail. I was wondering if I'm doing something wrong? Or forgetting something? What's the best way to add composer libraries to your own custom module?

Best regards!
['https://craftcms.stackexchange.com/questions/28175', 'https://craftcms.stackexchange.com', 'https://craftcms.stackexchange.com/users/8359/']
Twig has an [interpolation syntax](https://twig.symfony.com/doc/2.x/templates.html#string-interpolation) (using `#{}` inside a double-quoted string) to accomplish this:

```
{% set location = block.locationVacancies %}
{% set entries = craft
    .entries
    .section('careers')
    .search("locationVacancies:#{location}")
    .all() %}

```

---

In addition, you can be more explicit about the values you’re searching for (and avoid any kind of sneaky `search` capabilities/side-effects exposed by using raw query input):

```
{% set location = block.locationVacancies %}
{% set entries = craft
    .entries
    .section('careers')
    .locationVacancies("*#{location}*")
    .all() %}

```

…or even using Twig object syntax…

```
{% set location = block.locationVacancies %}
{% set entries = craft.entries({
    section: 'careers',
    locationVacancies: "*#{location}*"
}).all() %}

```

(`locationVacancies: location` will also work, but disables partial matching)

> 
> It should be noted: if you're looking to associate multiple explicit entries, you can also make the field within your (presumed) Matrix Block an `Entries` field, which establishes actual relationships in the database—accessing such a field (`myBlock.myLocationEntriesField.all()`) will return that list of Entries, exactly as set in the admin) If you just need a dynamic search param, what you have is a fine solution!
> 
> 
>
```twig
{% set location = block.locationVacancies %}
{% set entries = craft
    .entries
    .section('careers')
    .search('locationVacancies:"' ~ location ~ '"')
    .find()
%}

```