how best to apply code from db to page

4 posts by 3 authors in: Forums > CMS Builder
Last Post: December 22, 2017   (RSS)

Hi,
I was just wondering, what is the best form type to apply snippets of code through out my site. aka should I use a text box for both <meta name="description" and <meta name="keywords" or should i use the wysiwy

thanks for any input.

kenny

Damon thank you

What I meant was rather than using an s s i using an if else, but to use data from the database for the complete meta area in one db field.

Thank you

K

By Dave - December 22, 2017

Hi Kenny, 

There's no one "right way" to do it, but when I often do is create a single-record section called "snippets" in the CMS and record all the common site elements there.  And then I load that record on every page to output common header and footer info, etc.

That's one way you could do it.  Alternatively, if you have a section such as "articles" you could add a meta description, and meta keywords field to that section so you could output different values with each record.

Hope that helps!  Let me know any other questions.

Dave Edis - Senior Developer
interactivetools.com