homepage Welcome to WebmasterWorld Guest from 54.196.189.229
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
Complete separation from content
arcticsoft




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

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.

 

simonuk




msg:3958145
 3:24 pm on Jul 23, 2009 (gmt 0)

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.

rocknbil




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

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.

arcticsoft




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

"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?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved