Created
February 25, 2011 10:06
-
-
Save ojii/843607 to your computer and use it in GitHub Desktop.
The bit inside the 'cmsplugin' tag is actually a link plugin!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LinkPlugin(CMSPluginBase): | |
def get_embed_content(self, instance, parent_instance): | |
ctx = Context() | |
return render_to_string(self.render_template, self.render(ctx, instance, None)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p> | |
Some normal text. <cmsplugin pluginid="123"><a href="http://www.djanog-cms.org">django CMS website</a></cmsplugin>. | |
</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p> | |
Some normal text. <cmsplugin pluginid="123" />. | |
</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p> | |
Some normal text. <a href="http://www.djanog-cms.org">django CMS website</a>. | |
</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment