Search
Other Snippets questions
Forum

Parametr extract snippet content?

Marcin Równicki's Avatar Marcin Równicki
Hi.
Can i use snippet for this example

Snippet
<div style="border:2px solid red; padding:10px;">
  test snippet: {content} <- A parameter that will extract the content that is in the article in the snippet
</div>

In article
{snippet alias="test"} Lorem impsum lorem ipsum {/snippet}

Output:
<div style="border:2px solid red; padding:10px;">
test snippet: Lorem impsum lorem ipsum 
</div>
Peter van Westen's Avatar Peter van Westen ADMIN
No, that is not possible. Snippets doesn't have a closing tag.

What you can do is use ReReplacer to create your own custom wrapper.
Something like:
[ALERT]Lorem impsum lorem ipsum[/ALERT]
Or whatever tag/syntax you want.

Then simply replace those with the required html tags.
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription