Hi Community,
I'm fetching a html from a Template URL, with meta tags, link rel and so on.
Is there any fancy and easy way to append all that html to the head tag instead one by one ?
Many Thanks in advance,
Best Regards,
Andrew Tabata
HI Andrew,
Can you give me an example of what you're trying to do?
Hi Andrew,
You can use HTTPRequestHandler.AddPostProcessingFilter("<\/title>","<\/title><ALL YOUR CODE>") to add all your tags to the <head> section.
Kind regards,
Remco Dekkinga
Hi Joao and Remco,
First of all thanks for your response.
Let me give an example of what i am trying to achieve.
I fetch a html: i.e: (the one below) and i want to add all these html to the <head> in one go.
<meta name="dcterms.coverage" content="Some Text" /><meta name="dcterms.creator" content="More Text" /><meta name="dcterms.modified" content=" " /><meta name="dcterms.description" content="" /><meta name="dcterms.format" content="text/html" /><meta name="dcterms.language" content="eng" /><meta name="dcterms.publisher" content="More Text" /><meta name="dcterms.rights" content="Copyright Something" /><meta name="dcterms.title" content="Petitions" /><link rel="icon" href="https://www.someurl/favicon.ico" type="image/ico" /><link rel="shortcut icon" href="https://www.SomeUrl/favicon.ico" type="image/x-icon" /><!-- Global CSS --><link rel="stylesheet" href="https://www.SomeUrl.com/bootstrap-v3.min.css" type="text/css" /><!--[if lte IE 8]> <link rel="stylesheet" href="https://www.SomeUrl.com/bootstrap-v3-ie.min.css" type="text/css" /><![endif]--><link rel="stylesheet" href="https://www.SomeUrl.com/global.css" type="text/css" />
Is there any way to append these on the <head> instead of having to add line by line with the addStyleSheet and AddMetaTag ?!
Many Thanks,
Yes, you can use the function I explained in my previous reply.
Remco Dekkinga wrote:
Hi Remco,
yes you are right, it wasn't working because it had a "\" plus.
HTTPRequestHandler.AddPostProcessingFilter("</title>","</title><ALL YOUR CODE>")
Then it appends all the html below the title tag.
The Filter is a regular expression and the "\" is needed to escape the special character "/". That's why you need both.
Glad I could help you.
Really? That's weird, because when i used the ("<\/title>","<\/title><ALL YOUR CODE>") it didn't append it properly, only with the ("</title>","</title><ALL YOUR CODE>").
Many thanks,