Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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?
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 exploiting the Monastery: (6)
As of 2015-07-06 02:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (69 votes), past polls