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.
John, this has been added to RapidWeaver 7.3 and will be in the next beta
You should use the
%page_path% macro, and it’ll be replaced with a path to the current page.
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).
Hooray! Can’t wait… thanks, Simon!
Thanks, Isaiah! This is cool! Could really come in handy… especially when troubleshooting.
Any chance of doing something with a featured image so that the entire process of opengraph can be automated? Thanks!
Same question as Simon, Any chance of doing something with a featured image so that the entire process of opengraph can be automated? Thanks!
New beta is out: