Welcome to WebmasterWorld Guest from 54.162.239.134

Forum Moderators: not2easy

Message Too Old, No Replies

Complete separation from content

     
3:09 pm on Jul 23, 2009 (gmt 0)

5+ Year Member



I have a site that uses a stylesheet for the basic styles of the site. Fonts, backgrounds, buttons, etc. I also have dynamically created pages based on the id of the page being called, but right now this contains html tags such as img, p, b, etc. I have the task of modifying the site so the only thing that is in the database is text with no html. The content that fills the page has different numbers of paragraphs, headers and such. Is this even possible to do? I feel that the powers to be don't really understand that separating html from text is not separating content from style. I have been thinking of how to do this but can't think of a solution.
3:24 pm on Jul 23, 2009 (gmt 0)

10+ Year Member



There is no way of stripping out the header and paragraph tag (as an example) and then be expected to style them as such.

The only alternative is to start using inline styles or spans inside the div to style them. This is pointless though because the header is much simpler, smaller in byte size and easier to update because you don't have to go through each line of code on each page changing them.

3:50 pm on Jul 23, 2009 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Welcome aboard arcticsoft,

I feel that the powers to be don't really understand that separating html from text is not separating content from style.

In that you would be correct, but it's also possible this "database" is meant to be modified by non-html savvy workers, in which case it "half" makes sense.

I have the task of modifying the site so the only thing that is in the database is text with no html.

There is only one thing I can think of, and it doesn't manage any inline markups like <strong> or <em>, and doesn't manage headings.

You can take generic blocks of text with a line space between, like you're seeing in this post, and with your scripting identify the text blocks as paragraphs. Then when output, you have <p>content.</p>

But there **has** to be some form of "marker" or something in the text to designate headings and other markup. BBcode is a good example.

Perhaps you can do something that stores the markers/html and when viewed or exported for whatever reason, you strip them out. So the HTML is there, but the client will never see it. Kinda sneaky, but meets the requirements and the site still works.

Of course you'd have to do the same thing in an edit, and lose all the markers in the process.

4:10 pm on Jul 23, 2009 (gmt 0)

5+ Year Member



"it's also possible this "database" is meant to be modified by non-html savvy workers, in which case it "half" makes sense. "

I am the one updating the database and adding content. But this is to be able to add different languages of the same text. Right now to add a language it take 2-3 days for the entire site. But what I am wondering right now is if creating templates and sorting through all this content is worth it. Am I sacrificing 30 days to save 12?

 

Featured Threads

Hot Threads This Week

Hot Threads This Month