Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Adding content blocks to a static website

by sundialsvc4 (Monsignor)
on Sep 06, 2011 at 17:14 UTC ( #924435=note: print w/ replies, xml ) Need Help??


in reply to Adding content blocks to a static website

All things being considered here, I would suggest that you employ something like HTML::FormFu to let you quickly generate a simple CRUD (Create/Read/Update/Delete) functionality for a simple table of “included text.”   Provide such niceities as a start/end date, an active/inactive flag, and so on, as well as a text-box into which text can be entered using some familiar markup system, e.g. [b]...[/b] to represent Boldface and so-on.   “Just like a blog would do it.”   Any HTML-tag content would be stripped out, if you consider that to be a relevant issue.   (If you trust ’em ... and you well might then, if they mess up their own bed, they’re the ones who have to lie in it.)

Then, build a template on the server-side which defines how all such items will be displayed.   The front-page code (or what have you...) SELECTs the content in question, and displays it, using the template.   (If you are using Template::Toolkit, you can simply use a stock “filter” to sanitize the content.)   In this way, you are maintaining full control over how the text will be presented.   (You can, if you like, offer a drop-down list of template choices that they can choose from.)


Comment on Re: Adding content blocks to a static website

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://924435]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2014-09-16 07:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (157 votes), past polls