Originin logo
Snippets promo image

Configuring the component after install

After you've installed the Snippets component trough the Joomla! unified installer you'll need to save or adjust and save the configuration.

In the Joomla administrator goto: Components -> Originin Snippets.

The first time you'll see a friendly reminder telling you'll need to at least save the configuration once.

If you don't change anything in the settings window and just save it your component will be ready for use with just HTML snippets.

For power users

If you want to be able to add CSS with your Snippets you can check "Add CSS FILE" and "Use Default". That will give you a textarea for HTML and a textarea for CSS when you create a new Snippet.

If you want to be able to add JS with your Snippets you can check "Add JS FILE" and "Use Default". That will give you a textarea for HTML and a textarea for JS when you create a new Snippet.

You can have textarea's for HTML/CSS and JS but most common use will probably be just having HTML.

The CSS and JS will be written to a file and added to the Joomla! HEAD on the fly.

There's also an option to create your custom CSS and/or JS file location if you really need to.

!! Make sure the files are writable, you can check that on the Originin Snippets information page.

Creating a new snippet

In the Joomla administrator goto: Components -> Originin Snippets

Choose New from the toolbar menu.

Give your Snippet a name and a description if you like.

Create Snippet html markup and save the Snippet.

Adding a snippet to your article

In the Joomla administrator goto: Content -> Article Manager.

Give your article a title else it won't save.

Put your cursor in the main textarea where you want to add the snippets. This could just be on top in a fresh article but you can also add Snippets within or in-between other content.

At the bottom of the textarea you'll see a button called Originin Snippet. When you click that button a modal window will open with all your published Snippets. Pick the Snippet you want and click on it's name.

That click will insert a tag like: {origininsnippet}1{origininsnippet} in the text area.

Hit the Apply button in the Joomla! toolbar and watch how the tag will be replaced by the Snippet markup that goes with the ID 1.

Change your own {{placeholders}} with the real text and/or images and save the article.

Adding a lock to your snippet

For each snippet you create you'll have the option to add a Lock to the snippet.

Locking a snippet means that the snippet tag in the article will not be replaced by the actual snippet on the admin side after Apply or Save of the article.

The snippet tag will however be replaced on the front-end of the site. This means you can create a snippet with your contact details for example which you want to have underneath each article you publish. By locking the snippet you will only have to change the actual snippet when your contact details change and that change will happen everywhere on the site's front-end.

The snippet tag will look like this: {origininsnippet lock}1{origininsnippet}.