Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Adding content blocks to a static website

by sundialsvc4 (Abbot)
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://924435]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2018-05-20 12:35 GMT
Find Nodes?
    Voting Booth?