11 votes

Rndr - Url macro renderer

This is a simple package with one template and one small razor macro. With it you are able to call any of the macros in your site and get it's exact output as the result.

Url syntax :

http://www.mysite.com/rndr?macroalias=nnn&pageid=xxx

Where "nnn" is the name of the macro you like to run and xxx is the id of the published page which your macro will be using.

You can use this for example to test new macros. Or as a way to easily construct data which you like to fetch with jQuery ajax calls.

Pageid is optional, but then you must add a existing published page id in the included razor script file (rndr.razor).

You can use this for all macros, not only razor ones. However if you like to call an ascx macro that uses postback controls you must add a form runat="server" in the included template (rndr).

Security note : some added security is adviced since this can be called from wherever and on any macro. You could easily add your own conditions in the razor script file.

Sidenote: /base is really the better option to construct serverside data for jQuery calls et c, also that's even easier to use now in Umbraco Juno http://www.nibble.be/?p=95

It's only compatible with Umbraco Juno +

Before the current version this was a Python based package with a bit more advanced syntax. Read more about that and check out some examples at http://joeriks.wordpress.com/2010/09/01/introducing-rndr-a-package-for-macro-testing-and-ajax-calls/

Happy coding! / Jonas

Archived files

Documentation

Source code

Package owner

Jonas Eriksson

Jonas Eriksson

Jonas has 1825 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
Version 8.18.x (untested)

You must login before you can report on package compatibility.

Previously reported to work on versions:

Package Information

  • Package owner: Jonas Eriksson
  • Created: 01/09/2010
  • Current version 1.01
  • License MIT
  • Downloads on Our: 809