# Global Content/PHP includes - By hand or stack?

**URL:** <https://forums.realmacsoftware.com/t/global-content-php-includes-by-hand-or-stack/8113>\
**Category:** RapidWeaver Classic\
**Created:** [June 23, 2016, 8:57pm UTC](https://forums.realmacsoftware.com/t/global-content-php-includes-by-hand-or-stack/8113 "2016-06-23T20:57:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![1611mac](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/1611mac/32/5675_2.png) [@1611mac](https://forums.realmacsoftware.com/u/1611mac)\
**Post date:** [June 23, 2016, 8:57pm UTC](https://forums.realmacsoftware.com/t/global-content-php-includes-by-hand-or-stack/8113/1 "2016-06-23T20:57:29Z")

</div>

I currently do php includes by doing the old fashioned way. Coding the snippets and coding the calls into stacks with a normal “php include”.

I know Joe Workman has a stack for includes. Are there any others? Any users of the Workman stack and are you happy with it?

---

<div class="post-metadata">

**Author:** ![BrandonCorlett](https://avatars.discourse-cdn.com/v4/letter/b/67e7ee/32.png) [@BrandonCorlett](https://forums.realmacsoftware.com/u/BrandonCorlett)\
**Post date:** [June 23, 2016, 9:38pm UTC](https://forums.realmacsoftware.com/t/global-content-php-includes-by-hand-or-stack/8113/2 "2016-06-23T21:38:41Z")

</div>

I have the @joeworkman stacks and they rock.

I would like to learn how to do it by hand for my general knowledge though.

---

<div class="post-metadata">

**Author:** ![1611mac](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/1611mac/32/5675_2.png) [@1611mac](https://forums.realmacsoftware.com/u/1611mac)\
**Post date:** [June 23, 2016, 10:04pm UTC](https://forums.realmacsoftware.com/t/global-content-php-includes-by-hand-or-stack/8113/3 "2016-06-23T22:04:22Z")

</div>

1. put folder on your server named “includes” (exact name not critical)
2. put your code snippet in the “includes” folder (such as “footer.html”)
3. on your RW page put the php call to the snippet \<?php $path = $\_SERVER['DOCUMENT\_ROOT']; $path .= "/includes/footer.html"; include\_once($path); ?\>

---

<div class="post-metadata">

**Author:** ![1611mac](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/1611mac/32/5675_2.png) [@1611mac](https://forums.realmacsoftware.com/u/1611mac)\
**Post date:** [June 23, 2016, 10:12pm UTC](https://forums.realmacsoftware.com/t/global-content-php-includes-by-hand-or-stack/8113/4 "2016-06-23T22:12:16Z")

</div>

how do you enter “code” on this board?

---

<div class="post-metadata">

**Author:** ![1611mac](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/1611mac/32/5675_2.png) [@1611mac](https://forums.realmacsoftware.com/u/1611mac)\
**Post date:** [June 23, 2016, 10:16pm UTC](https://forums.realmacsoftware.com/t/global-content-php-includes-by-hand-or-stack/8113/5 "2016-06-23T22:16:45Z")

</div>

And the use of php assumes of course it is running and configured on your server. Pages must be .php and not .html or you must configure htaccess to process html as php

---

<div class="post-metadata">

**Author:** ![1611mac](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/1611mac/32/5675_2.png) [@1611mac](https://forums.realmacsoftware.com/u/1611mac)\
**Post date:** [June 23, 2016, 10:18pm UTC](https://forums.realmacsoftware.com/t/global-content-php-includes-by-hand-or-stack/8113/6 "2016-06-23T22:18:29Z")

</div>

Does the Workman Global Content stack work across Projects? I have a site that consists of several project files…

---

<div class="post-metadata">

**Author:** ![TeamSDA](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/teamsda/32/1852_2.png) [@TeamSDA](https://forums.realmacsoftware.com/u/TeamSDA)\
**Post date:** [November 18, 2016, 6:23pm UTC](https://forums.realmacsoftware.com/t/global-content-php-includes-by-hand-or-stack/8113/7 "2016-11-18T18:23:24Z")

</div>

**Hello Greg…** Thank you for posting this in the forum. I believe I have a similar need. I have a public facing site which can be managed via a single RapidWeaver project but where things get tricky is the membership side. The dashboard pages would live in the main site project while all the content sections would all be individual site projects.

What this requires is that the public facing pages all need one type of header (Nav) and footer while the dashboard pages and individual member content sections, which are designed and published via separate RapidWeaver projects, need second layout for their headers (Nav) and footers.

The goal is to be able to publish any changes to the headers (Nav) and footers from one place. Further the membership content RW Projects would be just that, each content RW Project would simply manage its content and pull the header and footer in via the PHP Include approach. I am curious how you got on with things and if you wouldn’t mind elaborating further?

Kind Regards,  
Dave
