Welcome to Geeklog, Anonymous Friday, April 26 2024 @ 08:29 am EDT

Geeklog Forums

Staticpages include


Status: offline

Euan

Forum User
Full Member
Registered: 04/22/02
Posts: 292
An idea: I would like to be able to include an identical section of HTML in several different staticpages. The easiest way to do it would be to write that code in a separate staticpage, and include that page in other pages with something like

Text Formatted Code

[staticpage_include:staticpageidhere]

 


This can easily be done within the staticpage plugin when parsing for staticpage links. I don't have time now, so if anyone is interested.... go for it. Look in functions.inc for the function plugin_autotags_staticpages and hack there for a quick solution.

As a further extension, which I just thought of while writing now, this might also develop into a more generalised protocol for plugins to replace code: anything within square brackets is parsed as:

Text Formatted Code

[pluginname_functionname:items to pass to function]

 


I once did a similar thing to include blocks in a staticpage. This would allow other plugins to work freely with the content of the staticpages but might require some thought regarding security.

Any takers?

Cheers

Euan.
-- Heather Engineering
-- No job too small
 Quote

All times are EDT. The time is now 08:29 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content