CMS Development

nhokloz1059
Miembro

How can I get all text in the h2 tags on my blog post.

resolver

I want to get all text in the h2 tags on my blog post body.

Anyone help me

0 Me gusta
1 Soluciones aceptada
Designer_WOT
Solución
Colaborador

How can I get all text in the h2 tags on my blog post.

resolver

Hello @nhokloz1059
      Just open the blog post template and you will find the  {{ content.post_body }in the post template's hubl code. just wrap that hubl with h2 tag like <h2>{{ content.post_body }}</h2> and all your post content will be in h2 tag.

Please note that this will wrap all the content having inline images, p tags everything. if you want spacific content than you have to use jQuery solution for it.

Hope this helps.

Ver la solución en mensaje original publicado

6 Respuestas 6
Designer_WOT
Solución
Colaborador

How can I get all text in the h2 tags on my blog post.

resolver

Hello @nhokloz1059
      Just open the blog post template and you will find the  {{ content.post_body }in the post template's hubl code. just wrap that hubl with h2 tag like <h2>{{ content.post_body }}</h2> and all your post content will be in h2 tag.

Please note that this will wrap all the content having inline images, p tags everything. if you want spacific content than you have to use jQuery solution for it.

Hope this helps.

nhokloz1059
Miembro

How can I get all text in the h2 tags on my blog post.

resolver

Thank you.

I'm done. Using jquery to get h2 tags. And add them into my category. Emoticono muy feliz

0 Me gusta
Kevin-C
Experto reconocido | Partner
Experto reconocido | Partner

How can I get all text in the h2 tags on my blog post.

resolver

Hello,

 

You want to get all the h2 text, and do what with it?

 

If you just want to get it, I guess you could use the jquery ".text()" method and create an arry from the data.

Kevin Cornett - Sr. Solutions Architect @ BridgeRev
0 Me gusta
nhokloz1059
Miembro

How can I get all text in the h2 tags on my blog post.

resolver

I want to create auto category by get h2 tags.

0 Me gusta
Kevin-C
Experto reconocido | Partner
Experto reconocido | Partner

How can I get all text in the h2 tags on my blog post.

resolver

Ahhh! So this is extremely easy to do with jQuery which you may know.

 

Unfortunately I haven't the knowledge of how to do so with hubl. Or how to pass data between the two. I will continue to research and follow this thread. If you do find a solution please let us all know!

 

Thanks

Kevin Cornett - Sr. Solutions Architect @ BridgeRev
0 Me gusta
nhokloz1059
Miembro

How can I get all text in the h2 tags on my blog post.

resolver

Yes. Thank you. I am looking forward to your help.

0 Me gusta