RWThemeKit % Code For Page URL


(John S.) #1

I don’t actually do (commercial) RW Theme Design, but I do tweak a fair amount in my own theme files for my website work. It would be handy to be able to have a RW “%” tag (like %site_title%) that output the path to the current page. This would be VERY handy for use in things like Open Graph tags in the HEAD of a document, so I don’t need to create them individually for each page.


Macro to link stack pages
(Simon Maddox) #3

John, this has been added to RapidWeaver 7.3 and will be in the next beta :slight_smile:

You should use the %page_path% macro, and it’ll be replaced with a path to the current page.


(Isaiah Carew) #4

the stacks API does some of this too. it has a wide variety of path tools: like the doc root, a relative path back to the doc root, path to the common directory, etc.
and all paths are tweaked according to file type: (e.g. css needs needs paths relative to the html file it’s used in) and modified according to the path variations in Preview/Edit/Publish modes.

there’s a github repot for our integration test project it’s also a good demonstration of each path when you’re trying to solve specific tough problems (like file paths in exported php).


(John S.) #5

Hooray! Can’t wait… thanks, Simon!


(John S.) #6

Thanks, Isaiah! This is cool! Could really come in handy… especially when troubleshooting.


(...) #7

Any chance of doing something with a featured image so that the entire process of opengraph can be automated? Thanks!


(...) #8

Same question as Simon, Any chance of doing something with a featured image so that the entire process of opengraph can be automated? Thanks!


(Simon Maddox) #9

New beta is out: