Fetch data from Custom modules class and show it in HEAD HTML

Chetan Sharma asked on November 30, 2016 14:58

Hi All,

We have written custom modules to store products data. We have created dynamic pages using dynamic path generation to fetch product related data through its ID.

We would also like to show the Products SEO data in HEAD tag

  1. Possibly without using any extra query. Right now we are fetching data using a Datasource. Any web part that can use this data source to show data in the HEAD tag?
  2. Any way to access this data directly inside a HEAD HTML using macros. What would be the efficiency of using it in this way?

Cheers, Chetan

Recent Answers


Peter Mogilnitski answered on November 30, 2016 15:08

You can use "head html code" web part. Here is some info

1 votesVote for this answer Mark as a Correct answer

Chetan Sharma answered on November 30, 2016 19:13

Thanks Peter, I already knew. What I am trying to do is a an advance concept where I am trying to get Data from Custom Modules into a HEAD HTML.

My question was around best approach to access data and not what web part to use.

0 votesVote for this answer Mark as a Correct answer

Zach Perry answered on November 30, 2016 19:32

You might have to create a custom control that pulls the content from the datasource.

This might be somewhat helpful. Might have to combine the HEAD HTML webpart and a Repeater. The HEAD HTML just adds a new literal control:

Page.Header.Controls.Add(new LiteralControl(HTMLCode));

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.