Do you have access to the server-side? Server side scripting languages (and
the frameworks and CMSes built with them) have provisions for just this
sort of thing. Include statements in PHP and cfinclude tags in coldfusion,
for example. Every Content Management System I've used has had a provision
to create reusable content that can be added to multiple pages as blocks or
via shortcodes. If you can use server-side script I recommend it; that's
really the cleaner way to do this sort of thing. Another option you could
use that avoids something like iframes is to create a javascript file that
dynamically creates the navbar dynamically in your pages. Just include the
javascript file in any page you want the toolbar to appear in. That method
adds some overhead to your pages, but it's perfectly workable if
server-side script is out of reach.
Best regards,
*Jason Bengtson, MLIS, MA*
Head of Library Computing and Information Systems
Assistant Professor, Graduate College
Department of Health Sciences Library and Information Management
University of Oklahoma Health Sciences Center
405-271-2285, opt. 5
405-271-3297 (fax)
[log in to unmask]
http://library.ouhsc.edu
www.jasonbengtson.com
NOTICE:
This e-mail is intended solely for the use of the individual to whom it is
addressed and may contain information that is privileged, confidential or
otherwise exempt from disclosure. If the reader of this e-mail is not the
intended recipient or the employee or agent responsible for delivering the
message to the intended recipient, you are hereby notified that any
dissemination, distribution, or copying of this communication is strictly
prohibited. If you have received this communication in error, please
immediately notify us by replying to the original message at the listed
email address. Thank You.
<[log in to unmask]>
On Fri, Jan 9, 2015 at 9:57 AM, Brian Zelip <[log in to unmask]> wrote:
> Hi Anna.
>
> I'm not sure about the previous thread, but one solution could be to create
> an html page with just the content you wish to be globally available and
> then insert that content into multiple pages using an `<iframe>` element.
>
> For example:
>
> '''
> <!doctype html>
> <body>
> <header>
> <h1>Department Name</h1>
> <nav>
> <iframe class="global-nav" src="http://path.to/global-nav.html">
> </nav>
> </header>
> </body>
> </html>
>
> '''
>
> Brian Zelip
> ---
> MS Student, Graduate School of Library & Information Science
> Graduate Assistant, Scholarly Commons
> University of Illinois at Urbana-Champaign
> zelip.me
>
>
> On Fri, Jan 9, 2015 at 8:27 AM, Anna Headley <[log in to unmask]> wrote:
>
> > Hi all,
> >
> > Some time ago there was a code4lib thread about hosting some content
> > centrally (like a global navbar) for use on multiple web sites.
> >
> > I haven't been able to find it again. Can anyone point me to it?
> >
> > Thanks!
> > Anna
> >
>
|