top of page

Share Page Content in Knack

Updated: Sep 24, 2022

Instead of building similar content on multiple pages for different user roles, you can build a single page, then share it among the different users. Saves a bunch of time when building your Knack app. Let's take a look at how to do this.

Get a free Knack trial account here:

You can check out my Knack database services here: Knack!

Full Transcript

hey Dave Parish here with Knack Builders

got another video for you hey do me a

favor if you like these uh like the

video and better yet subscribe to my

channel that's helpful but today's topic



get it right here sharing page content

now typically when you're building on

your pages side it's best practice to

have um

the high level Pages be built around

different user roles but sometimes you

have content that you want all the users

to see

um one way you can do that is build that

content in each of the user roles or you

if it's the same content you can even

build it in one and then copy it over to

the other ones

um but that's not really that often is

tedious because you have to manage

multiple Pages if you have to uh change

content or you find a typo and you have

three user roles you got to go do it

three times there's another approach to

that where you can create a completely

separate page section

and share it with all

the uh different users it's a big Time


um and it works really well I'm going to

go through how to do that and I'll be

back in a minute thanks


okay here I go

a topic today shared page content

let me call up an app

thank you

right here this is an app it's for a

university a big university that gives

out grants people

academics or other schools can apply for

these grants

and we have several user rules

this took some I I set this up on

purpose sometimes you find out later you

have a bunch of years or you add on user

rules and they want to see the same

content too but the content we're

talking about here is the details of the

application itself

so the admins who are processing the

applications want to see you know all

the details on the detail page uh and

there's a couple other user roles that

want to see pretty much the same stuff

so I might do another video on best

practice of this how you arrange pages

um and how they revolve around the user


but we don't want to build this stuff

out a bunch of times here's the content

by the way

it's got all the boilerplate stuff about

it who's applying

and then a bunch of all the stuff that

they uh filled out a lot of stuff here

so here's my point we're not going to

build this a bunch of times we're going

to build it once

so in this case I create a new page

section plus page here


and I just called applications it's not

a user real quick it's where all the

details of the applications are going to


and where anyone can get to them they're

going to actually to the same page

now go here

's the key to this and follow this first

when you're setting up the login

you're going to put whatever user role

you want to access that into here


and now

I'm gonna go to the first level page


we're going to put in a table

of applications

and by the way

this is key this is all applications

it's not uh based on the logged in user

or anything it's every every application

there is

and the point here is no one's going to

see this page you don't have to pretty

this up you don't have to do anything

what we're they're going to see is the

detail page

now how do you make no one being able to

see this page

as soon as you make this first page

go to settings

well I'm sorry you're going to go at the

top level applications login

and you're going to go to settings

and you're going to uncheck these two by

default they're both going to be checked

meaning if this was a page

it would appear as a tab up top we don't

want anyone to see this this is just

allows us access to all the applications


then we're going to put all the

applications on it

then we're going to

create our content however we want now

actually as an aside

the the applications there's several

types of applications so we have a whole

bunch of content on this page


representing all the different the guts

of all the different types of

application you can see this goes on and


but we use page rules

to hide and show certain things we're

going to hide and show

you know if it's this type of


we're going to hide all the other type

of applications and so on and so on so

uh but that's a little too much detail

for this now here's how you access it

let's just go to admin home

this is a table of all the applications

we're going to go

to the

here's what we do instead of saying Hey

I want to create

here action

I want to create a new detail page I

said what is what you'd use if you were

creating the actual content on that user

role and if you were going to build it

the same way

for another user role you'd also

recreate that detail or you could copy

it but it's a detail page we're not

going to do that

we're going to use Link to another page

and then we're going to go find you're

going to find it down here that's just

going to be application details right

here View application details

um and then

it's going to direct us


this application detail page right here

and this even works if there's let's say

it's sales people or something they want

to see the details of something but

sales people are only assigned to their

leads or something

um when you're at so the first table

that they see

uh let's just give an example here

let's say this is they only see in their

records so they're not seeing them all

but when you go to the detail page of

that big new table we wait with all of

them it's just they're gonna only have

access to the stuff they had assigned to

there's a detail page only taken to

their stuff

now another thing you can do with this

this is our application detail

notice here

there's some functions

about these are what the admin people do

when they're processing the application

but some of these other user rules we

don't want them doing this we just want

them to look at it so again page rules

which are exceptionally powerful we can

set a page rule that says hey

let's go find one

well there's a bunch of them here the

point is if

um page rule would be if

I'll do a broad one if account user role

is not admin

we're going to hide this content we're

going to hide that content we're going

to hide this content so even though

we're trying to create a page here that

everyone can access we can have some

different functionality uh that hides

and show based on the user role and

still keep that one page

uh that we can manage again and we need

to make changes there's a typo whatever

we can do it one time

uh that's the gist of this and I'm going

to put one caveat of this our special

page here

that has all

the applications now there's nothing

really sensitive in this

but if you had sensitive data

stuff when someone clicked a detail View

and it's bringing up Social Security

numbers or potato or whatever we're

going to consider sensitive

um let's go to

well the point is the URL up top

not this you are this is you on page but

in the live app

if someone was clever

they could figure out

the app or the whole URL structure and

fiddling around

they might be able to figure out how to

get to this actual page

um that's not good uh

so if you have real sensitive

information I'd do it the long hallway

and build it out separately within each

each user role that's that own content

and no one's gonna be able to get to

other stuff so that's what I got

uh I use this all the time

if it's best if you if you know all your

user rolls

and you can plan it out and make these

uh that's best but a lot on a lot of


you just pop oh I need this user well I

didn't tell you about that or it's and

you start adding them

but if you think you're gonna need it

build it out like this up front and and

then it works well okay folks appreciate

it thanks

7 views0 comments


bottom of page