Common Page Header - Post ID 248587

User 2098492 Photo


Registered User
60 posts

Previously, with my static site, I used an include statement at the top of every page to include the site banner, Google site search, main menus, and social icons. Now that I've got that re-created in RSD, I need to go on to all the other top-level pages in my site.

I'm tempted to duplicate the current page to make the additional pages I need, but I'm concerned about being able to update the common header just once when necessary. Should I make these common elements into a separate file, then insert them as an HTML 'include' element?

I'd appreciate any guidance you might have.
User 271657 Photo


Ambassador
3,816 posts

As long as you're not using SDrive, you can use PHP Includes to do this. ;)
I love deadlines. I like the whooshing sound they make as they fly by. (Douglas Adams)
https://www.callendales.com
User 2098492 Photo


Registered User
60 posts

<div class="row">
<div class="coffee-span-12">
<div class="html-element"><!--#include virtual="/dc-new-nav.html" --></div>
</div>
</div>
If I create a HTML element to contain the include, RSD then creates a corresponding 'row,' 'span,' and 'html-element' class which affects the formatting of my navigation bar. Is it possible to insert a 'raw' include in RSD? If I remove all the added divs and pare it down to just the include, it looks fine.
<!--#include virtual="/dc-new-nav.html" -->
User 187934 Photo


Senior Advisor
20,239 posts

If you leave your html element to auto and none like it is when you add it to the page it should be fine for your include.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2098492 Photo


Registered User
60 posts

.row {
background-color: rgba(255,255,255,0);
margin: 0 auto;
border: 0;
}
.row .coffee-span-12 {
width: 100%;
}
.html-element {
min-height: 50px;
min-width: 10px;
position: relative;
}
I'm pretty sure these are the default values.
Attachments:
User 187934 Photo


Senior Advisor
20,239 posts

Do you have a link to a page with it?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2098492 Photo


Registered User
60 posts

Page as exported from RSD.
http://www.datacad.com/demo/new_index.html

Exported page corrected with manual edits.
http://www.datacad.com/demo/new_index_fixed.html
User 187934 Photo


Senior Advisor
20,239 posts

What are your edits?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2098492 Photo


Registered User
60 posts

See picture.
Attachments:

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.