0:00
it's another wednesday another live stream hopefully everyone's doing good today
0:06
let's see let's get the chat going boom
0:11
we got the users see uh my lights are a little dim let's uh let's up those
0:18
tad there we go i'm ready for myself mr devel okay
0:23
um just confirmation in the chat room up there we go mr cole is here thanks for coming
0:28
on excellent what else we got in the house
0:35
okay um so today we are going to um mr powers is
0:41
here thank you very much today we're going to be talking about iframes okay
0:48
and uh yeah it's going to be exciting i it kind of all sparked off a couple things actually so yesterday
0:55
a user on the community um asked about opening up a blog post using in total
1:02
cms a from a blog list inside of a lightbox and i've done demos of that before uh
1:09
primarily i think it was in like the foundation six and total cms live stream that i did
1:15
and we did a bunch of stuff there so make sure you check that out if you're using both products you need to watch that video okay
1:21
um and in that video i'm pretty sure i did an implementation of this but
1:27
i came up with a really clever idea hey rion and willy thanks for coming on
1:33
so um so yeah i came up with a clever idea yesterday
1:38
that makes it even better okay um i'm not gonna reimplement what i did
1:43
before but uh oh bill oh time change
1:48
i forgot about time change i should have mentioned that i didn't even think yeah we had time change um this week in the
1:55
us so yeah we're an hour earlier than usual gonna have to remember that for the
2:00
hangout on friday um okay so so yeah blog posts in in a light box
2:09
all the magic happens we'll build it today i'm i'm not going to build it the old way that i built it before
2:14
um which still works but i kind of like this new way it and i'll explain why and
2:19
why it's awesome and so i was going to do a live stream just about about just that but then i
2:24
got me thinking hey you know what iframes are pretty useful little tools
2:30
and um so we're going to be showing a couple other things that people i've seen people do
2:36
um davide uh actually you know guy behind foundation box he does a lot of cool stuff
2:43
i i may give you a sneak peek at something i forgot to ask him permission but hopefully he doesn't mind i'm going to
2:49
give you a sneak peek and show you an example of something that he's been working on that's going to be launching soon
2:54
and i'll show you how he uses um iframes as well in a new project that he's
2:59
working on so okay scott we're gonna educate you again
3:05
today hopefully um okay well let's get oops i just launched expose
3:12
all right there we go let's go ahead and
3:18
usual i i don't have much built for today um pre-built as usual
3:24
i was kind of hoping to build a little bit but um i think it'll be fun to uh kind of build
3:30
it and show you guys live i do have a little bit made um so i i
3:37
have this total cms thing built um but maybe first before i dive into this particular um
3:44
implementation maybe we should just talk about what an iframe is okay um let's
3:50
just start way at the beginning right so let's just create a new page and uh
3:57
let's go ahead and i'm gonna use my off-site stack okay and off-site is uh is a really cool
4:03
stack and there are if you have foundation 6 there is there is an i-frame i think i call it
4:09
iframe what did i call it or is it just
4:15
uh it's just embed i believe no
4:22
embed does i mean you could just put the code in there it's embed isn't all that fancy um
4:29
i had an idea i guess not
4:37
okay well offsite gives us some pretty cool stuff
4:43
now what is an iframe okay so um i just chucked off site onto this page okay and let's just go ahead and preview
4:51
okay and what what we'll see here is um it creates
4:57
basically an embed okay so by default i just use https example.org which if we
5:03
go to that website example.org
5:10
all right it's this okay so as we see it allows us to embed another web page
5:18
into our web page now there's a bunch of caveats okay for example you are not going to be able to
5:25
put in um google.com into here
5:31
it's not going to work okay um and that is because
5:36
a website can actually prevent you from including it
5:42
inside of an iframe so and the reason for this is that wasn't always the case but people were
5:49
basically like putting google.com in an iframe and then like you know
5:55
pretending they were google right and then maybe putting some other stuff around it like a skin and whatnot and so
6:01
um that is wrong right i mean because people were basically embedding google and promoting themselves and whatnot by
6:08
leveraging google through an iframe right so it is possible to for a website to
6:15
block themselves from an iframe so if you ever try to iframe a um a website and it doesn't work
6:21
chances are it's because that particular website has blocked you
6:26
from adding them to an iframe okay cool
6:32
now one thing that's a little funky with iframes and it has been forever
6:37
is sizing of the iframe okay um let's go back and let's go ahead
6:43
and just do uh example.org again okay we'll go over name and title um in
6:50
a little bit actually name is important title is just an accessibility thing okay
6:55
um so one thing you might want to do is make sure that loading by default it's lazy load i do
7:03
recommend that um because then it'll essentially the browser will kind of load those resources in the background
7:09
um that's the default setting i definitely recommend that um but if you need to make sure that that the iframe
7:14
is loaded like right away um you can you can do on-page load okay
7:19
but i recommend lazy loading uh you can also disable scrolling which you know sometimes iframes will show a
7:26
scroll bar and stuff like that um david is asking how do you protect a website from being an uh used
7:34
in an iframe uh we can talk about that at the end it's just some special headers um you could probably add it to your
7:40
htaccess file okay so there's some security headers that you can add to your hd access files
7:49
um or sometimes hosting company hosting companies are starting to have those options in their cpanel so maybe your
7:54
host has an option sometimes some hosts even have that on by default okay you can disable scrolling and then
8:01
also allow full screen this allow full screen it's used in very certain situations in
8:10
very edge case scenarios so chances are you're not going to have this allow all you know full screen thing it's mostly
8:15
for things like youtube embeds and and some other services right so um this allow full screen thing doesn't
8:21
really pertain to everything okay disable scrolling definitely does so like if
8:26
let's say um because let's go down to sizing so here with sizing by default
8:33
um it is proportional sizing so you can you can define the width and the height and if we preview this here let's
8:39
preview in a browser instead you'll see as i as i sh resize my browser window
8:46
notice this gray line that is the iframe right and uh so that is something that you
8:53
know it is proportionally sizing itself okay so it's essentially a web page
8:59
inside of a web page okay and you can have these iframes i i guess i should point out um like here let's just do
9:06
site styles and let's do a a two column stack i will shrink site styles here
9:13
uh and i just have off-site inside of you know the second column there you go it works and what's kind of
9:20
interesting is okay if you notice um the iframe is shrunk down so it makes
9:27
this particular go to like mobile break point right
9:33
um if you're if you recall hey let's make a copy um well i'll have
9:38
two iframes on the same page there we go if you notice this one has like a gray background and you know it
9:43
has this little box and then in this one down here in this example down here the box goes full width
9:48
right that's because this iframe is really small so it causes that it's like having a little mini browser window and
9:55
that that triggers the mobile breakpoint here inside of this iframe because it's smaller okay so think of you know really an
10:03
iframe is a website inside of a website right so that's kind of how that works
10:10
now um let's say on this one though you can there's other options um
10:16
there's this thing called fit content it's a feature i added last year into off-site and um it's
10:22
complex okay and what it does is it it attempts to automatically size the iframe to fit the content okay
10:30
and um so as you see here this particular one fit you know it fit the content
10:35
sometimes it works it is a hit hit and miss depending on what the type of content and the you know whatever is
10:40
made inside of that that iframe um but yeah fit contents there you can also do static sizing which means always
10:47
be this particular size or you know static plus responsive you can do um basically it's it's height
10:53
based so you can say uh define the height the particular break points okay
10:59
um and then you can do viewport height which is basically just make it the size of the web browser okay
11:04
um so anyway we're gonna stick with proportional for today uh and uh but yeah there's a bunch of other height
11:10
options and obviously in true foundation 6 style we have custom classes for
11:16
um the iframe as well as there's like a wrapper around the iframe
11:22
that helps us do things like this sizing and whatnot so you can add classes to both of
11:27
okay so that is a pretty exhaustive look at off-site okay um
11:35
really quick i guess damn i won't go into those hd access
11:42
rules right now uh i'll i'll try to find them later on okay there are just a couple one i'm sure if you google it
11:48
htaccess rules block iframe it'll be some security headers
11:53
siri thought i was talking to her um let me uh take siri off here
12:01
okay um okay so that's a pretty exhaustive look
12:06
at offsite now one thing is actually interesting is the uh off-site video on the product page is like it's really old
12:14
i've done tons of updates to off-site i actually i've completely rewritten it so this is now the new um you know default
12:22
overview of off-site so i'll make sure i put this on the product page this live stream as well okay
12:27
all right so let's get into into some cool stuff okay um
12:33
let's go ahead and let's look at an example if we go to sandbox.joeworkman.net right now
12:38
i think i published this yesterday okay we see we have a blog list okay nothing super fancy here it's just a
12:45
rudimentary blog list and if i click this read now button okay you'll see that it opens up the
12:51
blog post inside of a lightbox all right let's find one that has actually some content oops
12:58
man am i the only person that absolutely hates this pinch and zoom feature inside
13:04
safari oh i really loathe that okay read now so
13:09
if i click read now on this particular uh blog post we'll see that i have access to the full blog post we have the
13:15
slider with it with all the images my title up here and then the blog post
13:20
content and as you see here i have scrolling enabled right um so you know but if if i
13:27
had in the off site stack i can disable that scrolling if you really wanted to doesn't really make sense here but yeah
13:33
pretty cool right um so here this is what we're going to be implementing right now
13:39
okay so um here i i have a rudimentary just blog
13:46
list um one thing i do have to say you still have to have an external blog post page
13:52
okay so here on my home page let's delete this untitled page here delete
13:57
remove okay so you need two pages you still need a blog list and you still need a blog post
14:03
page okay so just as a normal setup as if you were to do a blog okay on this blog post page
14:12
you really don't do anything fancy um oh i need a blog post id to kind of
14:18
show um hold on one second
14:25
let's get a blog post id just so we can look at it in preview this is vacation dash dream
14:32
okay let's do a blog post stack preview post vacation dash
14:39
dream a lot of people don't know what this with this uh this setting is right here okay this preview post
14:45
you you put a permalink of an actual blog post that's on your website and then you can preview the
14:52
contents of that blog post locally inside rapidweaver okay or inside safari wherever you want to
14:58
preview okay so if we preview this voila
15:04
now what's what what we'll notice is this blog post page is very minimal right i mean it doesn't it's not
15:11
going to have the menus it's not going to have a lot it's just going to be it's a very minimal
15:17
thing right because in this particular example this is going to be showing this is going to be displayed inside of a
15:22
light box right and we don't want everything we just want the post content
15:28
now if you really wanted to get fancy oh man i just came up with another idea
15:33
if you wanted this to to be um different like for you can have the
15:39
same blog post page but like it shows one way in a light box and shows a different way if it's not loaded in an
15:45
iframe um cool idea maybe we'll get that to the at the very end if you guys want to talk
15:50
about that idea um just popped into my brain it could be possible though with agent
15:55
okay but um let's get back to business here so i have my blog post page
16:01
and if we want to see the url is slash post okay in this case um but it could be whatever you want it
16:08
to be now now here i have a blog list i've really done nothing fancy here oops
16:15
okay um i just added my gallery a title a summary and then i added a link button
16:23
now this is a foundation six link button okay and
16:28
but the user i said this entire id was sparked by a user on the community who is using foundry so i'm gonna i'm going
16:36
to explain this how to do it with the foundation 6 link button and then hopefully we'll i'll look into
16:44
the boundary buttons to see if it's possible or maybe we i'll create it with like a you know just a default stacks
16:50
button as well the same kind of functionality but for right now we're gonna we're gonna continue on with the
16:56
foundation six link button okay now um in my prior example that when i
17:03
built this before i actually added a light box inside of the blog list
17:08
that essentially what it did is it created a different light box for every single blog post in the blog list
17:15
and each of those light boxes contained an iframe i have a completely new implementation
17:21
now where i have one lightbox with one off-site stack on the page
17:27
and then this this link button will dynamically launch and reload the post inside of
17:33
this the central light box this is really really really cool okay
17:39
um so why is this cool
17:44
let me just let me get big okay so why is this cool before when i implemented this before in
17:50
the foundation 6 and total cms thing um what it did is is it loaded an iframe
17:56
of the blog post page inside every single blog list
18:02
what that means is even though the iframe isn't displayed it's still like loaded by the browser
18:07
even if you have lazy loading it's still kind of loading it in the background but with this methodology that we're
18:13
going to be doing right now since the lightbox is centralized to the page
18:19
it loads things on demand which is really really really cool like
18:25
this is awesome it's this this way that i'm showing showing you right now is going to be so much more performant
18:31
faster page load times because all of this is happening dynamically it's really cool all right let's get back to
18:37
it so again this light box is a central light box okay and let's show um how all
18:45
this is set up so you have a light box the the important part here is you have a light
18:51
box id okay uh we're going to be linking we're going to be pointing this link to that
18:57
okay later on this links button um so this lightbox has an id i called it postbox and that is right here boop
19:06
right there it's called postbox okay then we go and then inside of this
19:12
light box the only thing i have is i have a close button and then i have an offsite stack
19:17
now the important part here is a whatever you set the url to that's going to be the default okay i just put
19:24
the path to my page you can put the full url as well i just put the path to my blog post page
19:30
in theory you could actually leave this blank if you wanted to because on page load it's just going to be nothing okay
19:37
that might be better it should still work though um but i thought it would be it'd be good to kind of load um the initial blog
19:45
post page even with no blog post being loaded because then some things will get cached by the browser and stuff like
19:51
that on page load but an important setting here is going to be this name setting
19:58
so that is important we need to make sure that this name setting is set to something okay because
20:04
we're going to be referencing that later on and that's it okay that's all we need to
20:10
do um i i use static and responsive for this particular demo okay but um yeah
20:16
the important part is this name field inside of offsite okay so now let's go to our link
20:23
stack our link button stack again this is a foundation six stack
20:28
it is this bad boy right here this link button stack okay
20:36
so what magic are we doing inside of this link stack
20:42
so first off the first bit of magic okay is we are
20:48
linking to the blog post page and we're going to target the iframe
20:56
so this is a feature inside of the foundation 6 button where you can load a link inside of an offsite stack
21:05
by using by linking it to the iframe name so if you see here i have iframe name
21:13
and this setting matches the name inside of the off-site stack
21:20
and what that does is essentially instead of opening the link in the browser it opens this link inside
21:26
of the off-site iframe okay now there is some magic you might
21:32
look inside this link and see what the heck's going on there okay so this is
21:37
very important if you've never used um blog list macros there are a set of
21:44
macros that you can use inside of a blog list and essentially what this is
21:49
is this is the url to the blog post page so slash post slash index.php question
21:55
mark equals and then this little macro right here
22:01
fills in the permalink for each blog post
22:07
okay so if we go let me go back to safari really quick and you'll notice if i hover over these
22:12
read buttons um hopefully you can see the the tool tip of the browser i can't
22:18
unhover it's at the very bottom of the browser window right where you can see the the path to this
22:24
so we see that if we look at the bottom of the browser it says sandbox.joker.net slash index.php permalink equals weekend
22:31
dash testing okay and if i go to this one it goes to question mark permalink
22:37
equals vacation dream so as you see that macro
22:42
um transforms itself so that it's unique for every single blog post and it injects the permalink at the end
22:50
so it injects the permalink where we put this curly brace curly brace permalink
22:56
now if you ever forget what these macros are the blog list stack has a blog list
23:01
macros hints and this is where you can get all of the blog list macros okay so if you forget
23:08
what those are you can always access them here access them here okay
23:15
right now uh all the only one we need is this per is the permalink macro okay and again you go to edit link
23:22
you put in the path you have to put in the url you can't navigate to the page okay you have to use in url you can use
23:28
the full url with the domain or you could just use the path okay um
23:34
so there we go so that alone what that does is that
23:40
opens the the again the blog post page inside of this offsite iframe
23:48
now the next thing is we can't just load it into the iframe we need to launch the actual
23:53
light box so we can do that with the foundation six button as well and that by that we're doing um add
24:00
custom attribute and then what we do is we do data open
24:06
and value is postbox and this value here is going to be the id
24:12
of the lightbox so here remember inside the lightbox i put an id of box
24:18
but what we want is we're going to do data open post box
24:23
okay and that's right there
24:29
so that so essentially we're doing two actions with this one link button okay
24:34
now i i should note that normally you can use a nation six to open up a light box really simply we can
24:41
just do uh open light box and then we can open up a light box
24:46
but a button can't this particular button stack can't load in the the link right it can't load the
24:53
link into the off site so basically i took this feature of this button and we're adding it to this link through
25:00
this custom data attribute okay
25:08
so there we go pretty simple and and that's it that's all the magic
25:14
basically again we're we're creating a light box we're giving it an id we're creating an
25:20
off site giving that an id and then we're we're linking this button to do both of those
25:26
actions all at once and that gives us this
25:32
that gives us you know a read now button boop um you know and it opens up some of
25:37
these blog posts aren't interesting this is just test data so there we go this one has got you know
25:42
multiple images okay with our blog post content and what's awesome is
25:48
that that blog post is loaded dynamically like it's it's not loaded on
25:54
page load it's loaded dynamically when we click the button pretty cool
26:00
i see mr cole put in the um the htaccess rule inside the chat so
26:06
header set x frame options deny there you go thank you mr cole
26:12
okay um pretty slick right now this is using a
26:18
button what if we wanted like the entire thing to be to be clickable let's say on this image right how could we do that
26:25
i thought that would be interesting to play around with and this this would be essentially the
26:31
the same way i think the foundry button would work but what i'm going to do is
26:36
inside this gallery image there is a link to post option we don't want that okay you're gonna want that's another
26:42
thing you're gonna want to turn off the link to post in the image and in the title stacks
26:48
because you don't want those to automatically link to the page because that will actually link to the
26:54
page it won't load it inside of the um the off site inside of the lightbox
27:00
but let's see if we can get it working um so let's i'm going to add it foundation 6 has a oops not this one
27:06
i want a link container stack we're going to play with this
27:13
so so in the link container stack uh oh it does have the same exact
27:20
feature really cool okay so link container stack i'm actually just gonna copy this link um thing right so we're
27:26
gonna do here let's just copy and paste this so i have to type it again so we're
27:31
gonna go link container i'm going to do edit we're going to paste that in
27:37
and then we're going to do open inside of iframe name and that was post
27:43
frame okay and then we're going to add a custom data attribute we're going to do
27:49
was it data open data open post box data
27:54
open post box
27:59
okay and then what i do is i'm going to drag that in there and you can drag whatever you want let's
28:05
add the post title as well let's see uh and uh
28:11
let's publish
28:32
all right and now we'll see if i click on this boom there we go
28:38
so that that's a way if you wanted to you know transform the title if i look i'm linking click clicking on the title
28:45
does the same thing so if you don't want the button you want to link to everything in foundation 6 you're going to use this
28:50
link container stack okay i forgot that i added all these cool features to the link container stack very cool um
28:57
i'm going to go a little old school and let's show you how you could do it with a
29:04
um a link stack so let's do instead of the link container let's go to my free link stack
29:11
i have a free link stack here
29:17
where is lincoln anchor there it is all right link
29:25
this is going to be a little bit more involved because we don't have all the cool settings that foundation 6 has um
29:30
but let's go ahead and drag that in there okay and i'm going to set link we're still
29:35
going to set we're still going to use the macro okay but then the um the tricky bits are we have to add all
29:41
those custom data attributes here so uh what we're going to want to do is we're going to do target
29:49
key is already oh you know i've noticed with discard change uh i've noticed with rapidweaver like it in order if you want
29:56
to use the target attribute you have to use target in all uppercase
30:02
boom it's a workaround okay so you use target and then in all uppercase and then you do your the name of your iframe so this
30:09
was post frame okay and then um and then we want the
30:15
data dash open and that's going to be post box
30:22
okay um so we're gonna set that
30:28
and then we're gonna publish and this should work
30:33
i think
30:45
let's uh refresh boom works
30:52
yep and because i know it's the it's not cached because this this isn't clickable it's only the image because i didn't add
30:58
the title back in so there you go that's how you can do it with with a generic link stack or i mean since this is just
31:04
a um you know you can use the same exact concept with a generic button um now foundry um what if you're not
31:12
using foundation six so if you're not using foundation six um this target is still the same right
31:19
because that's how you we integrate with offsite so target in all uppercase
31:25
and then the name of the offsite stack now this is where it would be different
31:30
with foundry you have to put in whatever i i'm pretty certain foundry supports
31:36
adding some sort of data attribute to a link to open up a light box
31:42
pretty sure um you know at least it's it's i know it's pretty sure it's possible in bootstrap which is the
31:48
framework provided by foundry so hopefully you can figure that out if you're using foundry
31:53
you're for to open up the lightbox part you're gonna have to figure that out figure out how whatever you need to add
31:59
to a generic button or a link to open a lightbox um it's pretty simple with foundation
32:05
you just do data open and then the lightbox id and actually this this data open attribute for anyone that also
32:11
works for things like accordions pretty much anything that opens up
32:17
um you know off canvas um that date this data open attribute is pretty much global it's very
32:23
standardized across all the foundation um components so yeah data open and then the id in
32:29
this case the id of the lightbox so hopefully that helps out
32:35
for the user on the community that was using foundry okay um any questions on this
32:41
implementation um really quick or else we're going to kind of move on
32:49
three two one nothing okay let's move on to some other interesting implementations of
32:56
iframes so um
33:02
i i'm going to be a bit cheeky and i'm sorry davide if you're listening and you don't want me to show off
33:09
something fancy and new but let me load it over here i'm not going to give you a full tour because i don't want to spill all the
33:15
beans and spill his butt you know what i it's really cool he did a really good job
33:27
let me go ahead and i'm going to
33:37
can you hide the url bar in safari
33:50
all right i'm going to be cheeky here and i i don't want to steal away david's thunder so i can't even see the url of this of
33:57
this page okay there's a new project file he's working on and um
34:03
he has this little reviews thing and if you click on leave or review this opens up a light box with a form
34:11
and this form is actually a total cms form okay where you can type in your
34:18
your name and your email and then you can select a rating
34:24
and then you can um you know put in your review
34:32
okay and guess what this entire form it's an iframe
34:37
right so um yeah this just uh the reason it's an iframe it just kind of allows us to
34:45
leave the complexity off of this page right we can kind of compartmentalize this form onto its own
34:51
web page in fact let me go ahead and uh i'm going to
35:03
oops come on compartmentalize it the heck safari
35:13
i'm gonna go into do do
35:42
oh no how do i get my url bar back there it goes
36:08
all right there we go look at this here is the um the actual web page that is that form
36:16
it's an iframe and this all it has is a total cms blog form actually it's a blog
36:21
form i'm not going to go into how we built all of you know this particular form it has some magical stuff that i helped him
36:28
out with it's pretty cool but yeah this is it's nice because it you know we have this complex form that he
36:34
can then import onto multiple pages he's he doesn't need to have it in a partial and then you know partial that out it's
36:41
just kind of an iframe that's in its own centralized web page that he can simply iframe into whatever he wants whether it
36:47
be a footer into a you know a light box all kinds of stuff so it makes it very
36:52
flexible right um and lightweight and things that you can kind of transport around and you
36:58
know frame out into your web page and uh what's really slick is that we
37:03
don't even we don't really it looks it doesn't look like it's it gets it
37:09
looks like it's just a part of the web page right really really really cool
37:16
there we go so um i just wanted to show you this example of
37:21
what we could do to use an iframe to do something different and you know compartmentalize a particular component
37:28
so we built this component that we then want to you know have transportable across our site
37:34
and uh it's a really cool what you know use case for it okay
37:40
let's go ahead and let's start building up a uh
37:45
let me put my toolbar back a funny funny thing because the new like unified uh toolbar in safari when you uh
37:53
when you hide the url bar it also hides all of your tabs interesting i guess it kind of makes sense
37:59
it's threw me through me for a loop really quick oh man my toolbars are all jacked up now
38:06
okay i think i'm good to go all right so another thing i wanted to
38:12
show is um actually davide does this a lot as well as chris i know chris does this
38:18
um and what he does is let's just quickly build out
38:25
um an admin page okay a total cms admin page
38:30
um a lot of times uh what we do is
38:36
just add that let's do a new content i'm gonna extract that i'm gonna build this
38:42
super quick guys i'm just gonna do a two column over here and then
38:47
[Music] what we're going to do let's do column one it's going to be
38:55
we'll do three and we'll do auto
39:00
inherit here just for now okay um i'm not worrying about mobile i'm just
39:06
going to show you guys this really quick so
39:14
a lot of times what we'll do is let's say on large admin pages we want to break up our admin sections into
39:20
multiple pages right
39:26
so what we can do um let's go ahead i'm just gonna load in some buttons we're gonna do a link
39:34
all right
39:54
okay and oh you know what i'm gonna do i should have done uh sizing
40:03
do always always
40:08
always all right um i'm not gonna worry about the style very
40:14
much here
40:19
so a lot of times what people will do is they will create let's say i have three admin pages
40:27
okay and uh here let's fund i'm even gonna name this all out i'm gonna do slash
40:32
admin and then um under here let's say i have uh
40:43
yeah let's do let's duplicate this page
40:51
and we're gonna do here we're gonna do um
40:56
about and then the url here is gonna be um slash admin slash about
41:05
okay and then we're going to duplicate that and then what we're going to do here is we're going to do blog
41:12
and then we can do slash admin slash blog
41:18
okay and um for all intents and purposes i'm just gonna i'm not gonna try to build out an
41:24
entire admin area what we're gonna do is i'm just gonna put in some text okay so let's just do
41:30
text this is the about just so we can see
41:35
about admin
41:42
and go to the blog page
41:49
um blog admin okay oh and then
41:55
this menu right so um traditionally what we would do is we would
42:00
uh let's or let's do this
42:05
admin home okay um traditionally what we do is we we'd
42:11
want to make sure that so we'd have multiple blog pages this would link to let's go ahead and let's build it all
42:17
out let's go ahead and i'm going to link this page to
42:22
admin home this about page this is going to get linked to uh admin about
42:31
and this blog page this is going to get linked to admin
42:36
blog set link okay now
42:42
in this case i want all of these buttons to be the same across every page so what i what i
42:48
should do is i'm going to chuck all of these into a container we're going to do it uh auto
42:54
no wrapper i'm just going to go block select move those all into there we're
43:01
going to do this and we're going to create a partial and this is going to be called
43:07
admin menu okay we're going to go back i have my
43:12
admin menu and then we're going to
43:18
paste that in there
43:30
all right so now at least whenever i make changes to this admin menu it's going to be changed everywhere okay
43:36
let's go ahead and publish this
44:04
admin
44:10
okay so here i'm on sandbox.net admin okay and if you notice here if i
44:16
go to the about page okay this about page um you know shows
44:24
us the about page and we have all the menu over here if we look at the url the url is jordan
44:29
admin about right and we can go to blog
44:35
for some reason i have authentication oh i think it was when i did the access uh thing um i need to tweak that um okay so
44:43
if we go to blog it then goes to the blog admin page and all of these all these pages they're separate pages right
44:49
they're all separate pages but there's another interesting way to go about this
44:55
okay um instead of like reloading an entire web page again so if i want to go back
45:00
to homepage i click on that and it would load the webpage again okay now i'm on admin home
45:08
there's a very clever um way to make this better
45:13
okay so let's go ahead and do it do all of this i'm going to rebuild this
45:19
using an iframe okay
45:25
so what i'm going to do is um i'm going to
45:30
i'm going to create one more page here i'm going to duplicate this
45:40
we're going to call this home okay
45:45
and uh just for kicks we'll do slash admin slash home
45:52
okay
45:57
so i can do is i'm going to let's see oh and this one
46:08
oops that's not what i wanted whatever
46:15
let's go back to this page here what is i'm gonna i'm gonna trash that okay
46:21
and what we want is we're gonna load an off site into this so let's go ahead and get an offsite stack
46:30
okay and
46:37
we wanted we can do like [Music] so here we're just going to uh put our
46:43
default url um which i'm going to it's going to be slash admin slash
46:48
home okay oops
46:54
and if you wanted this to work inside rapidweaver you could put the full url so we could do https colon
47:00
sandbox.joeworkman.net admin home
47:06
okay there we go that way it'll work inside preview then we do um offsite the
47:12
name so let's do um admin frame okay let's just call it
47:17
admin frame now
47:23
let's go ahead and um i'm going to i'm going to extract this page with this partial
47:30
um and then let's start modifying these to support off-site okay
47:35
um so what we're going to do is i'm instead of loading um this is the home page
47:40
and we want this to be we're going to link this to admin home okay and we'll do is i'm going to target
47:47
the iframe name admin frame and i'm going to do all of
47:52
that here it's still going to link to the about page but instead of opening it in the browser i'm going to target the
47:58
iframe now let's do the same thing here we want to link to the same blog admin page but
48:04
we're going to target the iframe okay let's publish that
48:26
all right so now we're here and slash admin
48:38
okay so now if you see i have this menu system over here and then it's loading in the the various pages now we still
48:46
have all the old menus inside here we're gonna fix that okay but now you'll see if i click on about page
48:55
it automatically went to the about admin if i click on blog
49:01
oops did i not configure that right
49:08
oh i think i selected the wrong blog page here it's link
49:14
uh page admin blog set link
49:20
iframe name every frame yeah let's publish that again
49:29
it's a page here
49:38
single page for now
50:03
or if this cloudflare access thing is hitting me up okay
50:09
um so let's do about page
50:21
i want to do just as bar
50:27
oh i think i did the wrong homepage
50:36
admin home what's that link
50:43
interesting i wonder if i here instead of navigating to the page i'm actually going to put in the full
50:49
admin slash home okay this way i don't have to publish
50:54
either uh it'll just work inside wrap up so i'm going to put the actual url i wonder if that makes a difference
51:00
because it's not working 100 as i would expect url
51:07
that is going to go to admin slash about
51:13
and this one is going to go to url admin slash
51:20
blog all right let's just preview locally here
51:26
click on home page
51:36
okay i guess we'll publish again i think i have iframe and it disabled on my uh
51:45
fun times
51:54
oops
52:04
all right so that's a home page click on the about page click on the blog page there it goes all right
52:10
so let's deal with this iframe okay so i guess putting in the full url
52:15
kind of makes a difference and as you notice it's pretty instantaneous um and what's cool is if you notice we
52:21
never left slash admin the page never reloaded okay
52:27
so because we're now using this iframe we then go to each page and essentially just get rid of
52:35
a lot of the layout basically we only have the contents of what's going to be in that second column of the page right
52:40
and this is um let's do let's fix this admin home
52:47
and then here we go boop
52:52
there we go over here let me take that out delete that
52:59
and let's publish
53:16
and let's refresh
53:28
there we go browser cache so now we're at the admin home page and if i click about
53:35
i click out
53:48
there we go click blog there we go so as you see now
53:54
you see the title changing now imagine this was a full admin page where you know when you're when you click about it
54:01
takes you to and it shows you all the various total scene and admin areas and if you notice that the page never
54:07
reloads i'm clicking these buttons and it's dynamically loading that page into this iframe
54:13
and that page can contain all kinds of total cms admin areas this is a way of having what seems like a centralized
54:20
page but um the performance of offloading your different admin areas into
54:26
different web pages okay so that it's it's simple for your users they go to slash admin and
54:32
everything is loaded there then we just have various buttons or you can you know load these with a you can have a menu
54:38
system over here um the buttons were just a quick way for me to to do this right but um yeah pretty cool right
54:46
all happens dynamically by loading um these pages and our projects a little lighter as
54:53
well because then i don't need to design this menu system and put it on every page i just need to design this this
54:59
centralized part here okay and uh and yeah then the at that
55:04
point the url is still the same okay this works for admin pages and you
55:09
might be thinking oh this can i use this concept on my main website right like my
55:14
home page i guess you could but um i wouldn't necessarily i think for seo purposes
55:19
having everything be its own page is probably much better i mean for admin purposes that we can kind of have that
55:26
app feel because we don't need to worry about seo indexing and all that jazz um so i wouldn't necessarily take this
55:33
approach you know where you have your menu and then you're dynamically loading everything inside of an iframe maybe for
55:39
sections of your web page if you want to have like an interesting little cool effect um that you want to dynamically kind of
55:45
load in content kind of like this could kind of replicate like a tabbed environment right
55:51
um but i do think that i would stick away from this particular concept for a the main part
55:58
of our website where we want to make sure google is indexing things and whatnot but i think it works perfect
56:04
it's really super clever for an admin page
56:10
okay so um quick quick learning um i do think there was i don't know if it
56:17
was browser caching or what safari has been super aggressive with caching lately it's kind of driving me nuts um
56:23
but you know i did load the entire um here okay here's another thing
56:28
if if you don't want to put in your domain let's say you're you're working on a sandbox
56:33
okay and uh you don't want to have to worry about remembering to
56:39
change the domain names later on you don't need to include the domain you can just put in the path and click set link
56:45
there go here let's just delete this we could just put the path
56:52
although come to think of it i remember years ago there used to be a bug if you started a rapidweaver
56:59
link tool with the slash it didn't work great let's publish this to
57:04
make sure that works before um let's make sure before i give you guys the golden rule that you can do that it
57:11
should work though
57:26
yep so i need to turn that cloudflare access thing off on my uh sandbox that i did a couple weeks ago um okay so if we
57:33
go to homepage about page ah see okay that it did break
57:39
oh it has it adds two slashes
57:44
hold on all right that's interesting so there is a little bug but i'm wondering if we do
57:50
we do the full if we do index.php
57:55
at the end like put the full path i wonder if that will work let's try this
58:02
getting into some edge case stuff in here but be interesting to see if this works
58:10
publish that again
58:21
okay refresh
58:27
out that works so you put in the full path to the page
58:34
um that way uh that's just again a little trick for um if you are going to be changing
58:39
domains later on and you don't want to remember to change all these you know the website urls
58:45
inside the links you don't need to put in the domain just put in the path to the page and the browser will assume if you don't
58:51
have a domain it will assume that you're doing it on the current domain right there we go and you don't need that in
58:57
offsite as well so you can actually um
59:02
here we'll even put index.php that should work as well so if we go there
59:24
there it goes cool so now we have everything is referencing
59:29
relative you know or absolute paths to the current domain it's not domain agnostic it is domain agnostic right so
59:36
you can change your domain in your project and this will continue to work when you republish you don't have to worry about changing the domains
59:42
afterwards because i know that's a workflow for a lot of users um so yeah there we go um that was had for today uh
59:50
see um your help with accordion after the hangout uh how how about this
59:55
approach um this could work
1:00:01
um you could play around with it um rico uh interesting idea
1:00:07
um but yeah there we go rico if you want to chat more about that uh hopefully i can see you on friday we
1:00:14
can see how that accordion i don't remember all the details of the accordion i do remember it though
1:00:20
um but this could potentially work for that so hopefully you guys learned a little
1:00:26
bit about um offsite and some of its cool features as you see i've integrated it very
1:00:31
nicely into foundation 6 with linking via buttons
1:00:36
which is really slick but i also showed you how you can use a standard link tool to do that as well early on so
1:00:43
um you can integrate off-site with pretty much everything um so it's really cool if you don't have the stack super
1:00:48
powerful um as you see from today i'm sure there's more use cases it'll be interesting to see what we can do with
1:00:54
it what you guys do with it um you know i've seen mostly kind of more advanced users using these techniques so
1:01:01
i thought it would be interesting to kind of you know share it with the masses um since it's kind of been tried
1:01:06
and true for quite quite a while now by some of the more advanced users so um it's really clever um an interesting way
1:01:12
to kind of improve page support page speed performance um and for the blog
1:01:18
list example that is that's the bee's knees right there super simple so if you don't have off-site go check it out um
1:01:25
thing is 19.95 i didn't even check the price i think that's what it is right now so uh check that out hopefully um
1:01:31
you like it it makes your sites a little bit better take care everybody if you're uh not
1:01:36
aware friday hangouts super awesome check them out it's at uh one hour from
1:01:42
now um but on friday so make sure if you guys uh we changed times in the us
1:01:47
already so it is 12 30 right now pacific so um i think the rest
1:01:53
of the world hasn't changed yet so but with that said u.s senate apparently has passed the the a bill to
1:02:01
nix uh daylight savings time so it just needs to go through the house of representatives and signed by the president we'll see i have my doubts
1:02:07
it'll actually happen but um hey i'm i'm all for that i think it'd be pretty cool
1:02:12
get rid of daylight savings time um can you uh can you use stack macros for the url yes steve steve suggests in the
1:02:20
chat can you use the base url stack macro yes you can um
1:02:25
but as i said you don't even need the macro you just put in the full path to the page and you're good to go um but
1:02:31
yes steve uh you can use the base url macro um i think i have a video on all the
1:02:37
various macros and i vaguely remember doing some sort of faq on it but i'll look and see if
1:02:43
it's on the community i think i think i created an faq on like various macros that are that are supported by themes
1:02:50
and rapid even stacks and all that jazz um so yeah check those out macros are
1:02:55
fun too take everyone we will see you on friday hopefully at the hangouts if not we'll see you on the weaver space
1:03:00
community site and we'll talk to you soon bye