Forum Discussion
Thanks for the help VarunGrazitti and HaidongG .
Unfortunately I still can't get it to work.
I'm trying to make the following call (edited out some of the URL):
<#assign header = http.client.request("https://www....com/...-header-footer/header/html/json") />
And pull a json file. then I want to use ${header.main_html} to place the html on the page. I've tried making the endpoint but it doesn't seem to work or be able to pull the file, though I have no problem accessing it via my browser so I know the URL is correct.
Hi sdujari
if you need to pull the html and set into "<head>", you should not use httpclient (which is not for this purpose), but URL fetcher.
To do that, you need to provide the desired URL to Professional Services (or Lithium Support if post-launch), they can put a backend fetcher which fetches the content periodically and set to a community setting.
After that, you may access the html via
<#assign my_header = settings.name.get("fetch_url_key_given_by_lithium") />
in your wrapper components.
you may read more from http://community.lithium.com/t5/Launching-your-site/Providing-your-Lithium-design-UI-for-launch/ta-p/69314
...
- The customer will be required to provide Lithium with 3 different URLs, one for the head code, one for the header and one for the footer. Additional URLs can be configured if required
....
Related Content
- 10 years ago
- 9 months ago
- 11 years ago