inherit
242907
0
Dec 17, 2021 17:23:41 GMT -8
Sammiie
155
March 2017
sammiie
|
Post by Sammiie on Dec 10, 2019 16:02:01 GMT -8
Heya!
I'm currently trying to find some way to import HTML from one source, to many sources. In context, our site has a guidebook with a side menu. In order to edit the side menu, you must do the same edits 58 times (or to each individual page), which is honestly daunting and I hate updating our guidebook menu.
Is there anyway to import the HTML code from say one custom page to another using a similar import method? I just want to update the side menu code to my guidebook once. Once is enough.
I've been researching general methods, and haven't come up with any comprehensible tutorials that worked for what I'm trying to do with them.
Any advice will be appreciated!
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Dec 11, 2019 8:54:46 GMT -8
Not that I know of. The content of each custom page is unique to that page.
You could put your side menu in the Forum Wrapper template and use some template logic to only have it show on custom pages.
Admin > Themes > Layout Templates > Forum Wrapper
{if $[route.name] == "page"} ... side menu here {/if}
|
|
inherit
252032
0
Sept 18, 2023 9:07:51 GMT -8
Retread
Tribbial Pursuit.
5,014
January 2018
retread
|
Post by Retread on Dec 11, 2019 10:04:43 GMT -8
Not that I know of. The content of each custom page is unique to that page. You could put your side menu in the Forum Wrapper template and use some template logic to only have it show on custom pages. Admin > Themes > Layout Templates > Forum Wrapper{if $[route.name] == "page"} ... side menu here {/if} That sounds like a very workable solution. I was wondering about another possible way to slice this. Would it be possible to host the contents of the 'side menu' on a file hosting site (Cloudinary, for instance) as a pdf, then put that in a div that floats left on each custom page? When editing the pdf, the change would affect all the custom pages.
|
|
inherit
140147
0
Mar 26, 2024 17:20:16 GMT -8
Nscalerr 🐺
Throw me to the wolves and I'll return leading the pack!
2,991
May 2009
nscalerr
|
Post by Nscalerr 🐺 on Dec 11, 2019 20:56:29 GMT -8
Don't think it is possible to show the contents of a pdf easily on a page. I know it can be done, but not sure what the javascript and/or flash is like for doing it.
|
|
inherit
242907
0
Dec 17, 2021 17:23:41 GMT -8
Sammiie
155
March 2017
sammiie
|
Post by Sammiie on Dec 14, 2019 12:24:52 GMT -8
Not that I know of. The content of each custom page is unique to that page. You could put your side menu in the Forum Wrapper template and use some template logic to only have it show on custom pages. Admin > Themes > Layout Templates > Forum Wrapper{if $[route.name] == "page"} ... side menu here {/if} I'll try that, thank you! EDIT: Follow-up question already xD How do you "call" this javascript command on the actual page where you want the code to show up? Is there an ID that I should set or something else? Also.... it seems like I would have to do this for every page anyway?? Like there's no way to group the code in one place for multiple pages to use?
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Dec 14, 2019 14:25:57 GMT -8
Sammiie This isn't JavaScript, it's the logic that ProBoards templates are built on. It might be JavaScript under the hood, but it renders HTML. The Forum Wrapper template is used by all pages on your forum, so you don't need to repeat anything. Just put that block in your Forum Wrapper, once -- exactly as it's shown, and then look at one of your custom pages. You'll see "... side menu here". Like this: <div id="wrapper"> {if $[route.name] == "page"} ... side menu here {/if}
... </div> Once you've verified that "... side menu here" is appearing, you can replace that line with your actual side menu. It'll appear on all of your custom pages without the need to manually duplicate it on each page.
|
|