I’m wondering if it’s possible to change the title tag according to the REST API the data are coming from.
For now, I tried to bind a collection from the title tag panel in the metadata sub-panel of the page but the only collections that appear are coming from the Airtable data source.
Another idea I had was to plug into the body a document.title = dynamic title at the page level. Which is a solution proposed here : partial solution. But unfortunately, there is no bindable structure that I can operate from there.
Do you have any idea I could experiment with in the meantime?
As you’re using dynamic pages, I suggest using a filtered collection or storing the current item in a variable when visiting the page, then, you can bind the meta title here:
Thank you for redirecting me to the new way of creating dynamic pages. I’ve implemented the new logic for page navigation.
In the user journey, the user comes from a page called Villas, then clicks on a specific Villa, where at this stage the page changes while loading data from a REST API and storing it into an object. Basically, as done in the tutorial from the companies page > click on company > fetch company data > store it into a variable (selectedProperty) > display company page + data.
At this stage, everything works but somehow, when I reach the villa page I don’t see appearing the selectedProperty variable in the MetaData Tag, which I would like to use in order to bind the page title on it.
Should I proceed differently to manage this use case?
But they’re not truly dynamic. They come from a predefined list (static collection) at the time of app build. You can’t yet bind to a dynamic collection.
It is impossible to use filters on static collections.
I tried to use the workflow “On page load” with a step that calls a REST API to then filter it based on the id using custom JS and the URL parameter ID of the current villa page and then store it into a variable but it doesn’t appear in the binding.
To filter static collections, you would need to do this from the backend, as our servers are fetching them during build time, meaning they can’t apply frontend filters.
Otherwise, you could create a dynamic page: How to use the Pages | Weweb documentation but you would have to change the metadata yourself using some JS, as it’s not possible to bind metadata to dynamic pages yet.
I am using weweb to make a dynamic product page, but they now share the same metadata in search engine which is not ideal. Hopefully it can be implemented soon. Is it on the roadmap?
We do not plan to add the feature inside the WeWeb editor yet but… it’s already possible to publish dynamic metadata to dynamic pages of your WeWeb apps.
It’s a little bit more on the technical side so if you struggle with this, don’t hesitate to create a new topic in the community, sharing screenshots or a video of what you tried, and where you’re stuck.
By default, the config.js does not pass the env variable, so using Secrets would require customizing the script.
It’s also not clear how to actually use secrets inside the config.js - the assumption is that it is loaded into the env variable, but I can’t find anything that confirms that.
It seems to have been deployed properly, but no details have been given to verify.
The interesting thing is that this process does not access an Account ID or API Key, so I’m not even sure if its the same process as the GUI version
It’s a bit disappointing that something this simple, but critical, has been overlooked and thrown into this convoluted process. It’s crucial to SEO and to share on social media and other related platforms. I wouldn’t want to go live without it. So, this is holding up some plans.
the config.js file is just one part of the code. the env can be accessed in the main handler function in src/index.ts.
The ready-made repo cover one main use case, different needs require to change the code and some understanding of the workers.
it’s not nocode anymore but it is very interesting to experiment and learn more about workers.
I think at some point weweb will offer some easier way to do this.