thisPage object (as thisDocument or thisRow)

Have a thisPage object.

Example use case :
button in a table with multiple views in multiple pages,
Action -> openlink(“coda.io/” + thisDoc + “/” + thisPage.slug + “/” + thisRow.rowID + “modal=True”)

I simplified the code, but you get the idea, it opens the modal view of this page.

8 Likes

We would like this as well.

Our use case has to do with template pages that display various tables for a particular topic. The topic key is usually the page slug.

We currently need to manually adjust the filter of a half dozen tables every time we create a new page using this format. We could instead have a template page that would fill based on its page slug reducing the work to almost nothing.

2 Likes

@Blaise_d_Estais — while I see how thisPage could be useful overall and how it could offer a more convenient way to do what you need, FYI here’s the solution that you can use right now:

@Colin_Nickerson in your use case what I’d do is have only ONE page with a view with common settings (and not a separate page per e.g. topic), and implement user-specific filters of a sort (e.g. so that every user can individually look at a different topic, all in the same page)

Thanks for the suggestion Paul, but in our case these are pages of documentation with common attributes like related tasks, documentation status etc.

The page content varies from topic to topic. Also, the pages of documentation are referenced elsewhere and having a link to a single page that uses a filter isn’t sufficient.

At first, I tried working around this by making a documentation table and using a detail view … but inserting images, videos, and other media was too difficult. I also was unable to use a page outline which is important for longform docs

@Paul_Danyliuk you seem to hack around things in Coda a bit so I was curious if you ever looked into JS injection to add custom formulas to coda? We really need a proper thisPage as we have 40 pages with a common header, unique body, and common footer. Every time I add a new page I have to create new header and footer view but a thisPage function would eliminate all of that.

I have raised this with support but I understand that their priorities align more with average need across the community so I want to start to look into hacking in support myself for our team … but not sure if it is possible.

Because coda runs on client I assume there is a way to add a custom formula … perhaps getting the URL of a view and parsing out the page from it in the url would work … hmm

thisPage is something that should really be added to Coda. One use case that comes to mind right away is for wikis and knowledge hub. You could easily see who and when updated the page last time (as a mini automatic version control). There are many other ways this could be used, its just something that comes to mind as we run into the similar problem in knowledge base we are building for us.

7 Likes

this is a suggestion I was willing to add.
I end up needing this feature so often that I wonder why so few people is asking it (^.^’)

I have a fe use case for that. For example being able to have a revision table that can be filtered by page, and display it in each page (quickly by using thisPage in the filter).
It might be required to have a page type column though maybe…

Another use case I see is that I try to have my project documentation (it’s a game design doc since I am a game designer) to also list the user stories/items. I am trying to have 1 page per epic and I would find it convenient to list the items in a filtered view of each table.
And of course this can be very useful in the project management via the cross doc pack to sync this items table with the items in the agile project coda document ^^

I have a similar issue on wikis where with thisPage would be possible build a feedback system and know in which page this happend

1 Like

One more use case from my end is referencing specific control on the page.
I have a template page this is being duplicated for each site visit to create a summary for the site. In the page some of that data is pull from a table that has data for all our sites, so the way I do it, is to have a control where I set the site. But then there’s no way to reference that control other than by its name which end up being “selectedSite1 2 2 2 2” (since that’s how coda creates names for controls).

Idealy I would just be able to reference thisPage.selectedSite or worse case thisPage.controls.nth(1) or something similar and set all the filters to work that way.