set the page's title after processing the body
Is there a way to set the page's title and some other meta tags after processing the page's body where the appropriate information will be (after db queries)
I know that it can be done via javascript but this is not seo friendly, and it will fail if noscript. so it must be done server-side.
The best way is php but my page structure is a full page that includes the main content with php include (pseudo frames). and because the main content is after the page's title, we cannot call the variable containing the page title before creating 开发者_Python百科it.
any suggestions please?
Thanks.
JS is definitively not the way here, it'll be ignored by search engines.
In php, you have to use a template language to be more flexible and put the title wherever you want. Smarty is a popular one. Doc on Smarty
精彩评论