CMS Development

sjay
Membro | Parceiro Diamante
Membro | Parceiro Diamante

Is there any possibility to add an additional textbox in the page settings?

resolver

Hi There,

Wanted to add an extra text box in the page settings for our internal purpose.

Is it possible?

0 Avaliação positiva
1 Solução aceita
Jake_Lett
Solução
Orientador(a) | Parceiro
Orientador(a) | Parceiro

Is there any possibility to add an additional textbox in the page settings?

resolver

You could use the CMS API to get all of the pages and look for that data value https://developers.hubspot.com/docs/api/cms/pages#section-Site-Pages

 

If you are not familiar or comfortable using the API you could also try this.

  • Go to your website pages listing and make it show 100 pages.
  • Using chrome developer tools select the list of pages table inspect it and copy the HTML code
  • paste it into a text editor and select only the URLs - might need to use a regex for this. 
  • Look for href="/content-detail/[PORTAL ID]/site-page/[PAGE ID]/"
  • Create an array of all of these ID's
  • pass it to this loop hubl code. https://developers.hubspot.com/docs/cms/hubl/functions#content-by-ids - Each loop can have 100 id's and you can have 10 calls a page. 

If you have less than 50 pages you could also create a custom module with a pages field. Select the pages you want in a repeatable field. Then loop through it. Inside the loop, create your condition filter to show the pages with the widget value you need to check for.

 

Exibir solução no post original

6 Respostas 6
Jake_Lett
Solução
Orientador(a) | Parceiro
Orientador(a) | Parceiro

Is there any possibility to add an additional textbox in the page settings?

resolver

You could use the CMS API to get all of the pages and look for that data value https://developers.hubspot.com/docs/api/cms/pages#section-Site-Pages

 

If you are not familiar or comfortable using the API you could also try this.

  • Go to your website pages listing and make it show 100 pages.
  • Using chrome developer tools select the list of pages table inspect it and copy the HTML code
  • paste it into a text editor and select only the URLs - might need to use a regex for this. 
  • Look for href="/content-detail/[PORTAL ID]/site-page/[PAGE ID]/"
  • Create an array of all of these ID's
  • pass it to this loop hubl code. https://developers.hubspot.com/docs/cms/hubl/functions#content-by-ids - Each loop can have 100 id's and you can have 10 calls a page. 

If you have less than 50 pages you could also create a custom module with a pages field. Select the pages you want in a repeatable field. Then loop through it. Inside the loop, create your condition filter to show the pages with the widget value you need to check for.

 

sjay
Membro | Parceiro Diamante
Membro | Parceiro Diamante

Is there any possibility to add an additional textbox in the page settings?

resolver

Can anyone help me on this?

0 Avaliação positiva
sjay
Membro | Parceiro Diamante
Membro | Parceiro Diamante

Is there any possibility to add an additional textbox in the page settings?

resolver

@Jake_Lett  Jake: Any Idea?

 

Can I able to pull out the report based on value?

0 Avaliação positiva
sjay
Membro | Parceiro Diamante
Membro | Parceiro Diamante

Is there any possibility to add an additional textbox in the page settings?

resolver

@Jake_Lett : Jake any Idea?

 

0 Avaliação positiva
Jake_Lett
Orientador(a) | Parceiro
Orientador(a) | Parceiro

Is there any possibility to add an additional textbox in the page settings?

resolver

This cannot be done. But you could create a custom module called "Page Settings" or "Advanced Page Settings" that would be found in the content tab. You would add that to to the template so it is baked into the page and unable to be removed using the drag and drop area.

 

You could also set one or all of the module fields as required in order for the page to be published.

sjay
Membro | Parceiro Diamante
Membro | Parceiro Diamante

Is there any possibility to add an additional textbox in the page settings?

resolver

Thanks, Jake.

In that way, Can I pull out the report based on the value?

For Ex: I have added a custom field(dropdown) with two values at a template level on all pages.

Can I able extract the report which pages have a particular value?

Hope you understand. Please let me know if you need further detail.

0 Avaliação positiva