How to Use Auto tags
Generally, all you need to do is embed the auto tag with the required parameters into your story, comment, static page, or wherever you want. An auto tag looks like this:
[media:200706012342 What a pretty flower]
This example is using the media auto tag provided by Media Gallery. It will display the image with an image ID of 200706012342, using the default height / width (set in the Media Gallery configuration) with a caption of What a pretty flower.
We are passing 2 parameters:
- media ID (200706012342) which in this case must be the first parameter after the colon (:)
- Caption - generally the caption is the last item passed - you'll notice we did not need to put quotes around it. glFusion will process all other parameters and any thing left over will be the caption.
Using this specific auto tag will produce the following:
As you can see, this creates a nice thumbnail of the image which can be included in a story, or other item. The image can be right or left aligned so that text flows around it nicely. Here is the same auto tag with some text.
How easy was that! glFusion and the Auto tag system take care of all the hard work to make the thumbnail, align it properly and present it.
Let's Get Creative
The real power of auto tags comes when you get creative. glFusion is pretty limited in how it presents information - the main page has blocks, content (story items), header and footer. What if you wanted something a little different? This is where the combination of the Static Pages (Pages) plugin and auto tags provides a ton of flexibility, with very little knowledge of HTML needed.
What if we wanted a main index page that had the following:
- header with menu
- splash image or maybe a splash rotator
- latest news articles - across 3 columns
- latest images uploaded to media gallery
Well, the header and footer are pretty much out-of-the-box glFusion, so no real magic there. How do we create the rest of our layout? The static page plugin is the key - when you create a page in Static Pages, you have the option to make it the full index page, or just display at the top, etc. In this case, we want it to become our full index page.
Now, we need to pull in splash image or a set of images - Media Gallery is a good source for this. Let's use the [mgslider] auto tag - it will pull images from a specific album, show them in a slideshow and overlay the title / description text on them.
Latest Articles / Stories - we'll use the [headlines] auto tag for this. headlines will pull the number of stories you tell it and organize them in a nice columner format.
Finally - we need to get the new images. We'll use the [newimages] auto tag for this. It will pull the latest uploaded images and present them in a nice, flexible grid that automatically adjusts to the page width.
So where is what our static page content looks like:
[mgslider:7] <h2>Latest News</h2> [headlines:all] <h2>Recent Uploads</h2> [newimage:10]
That's it! Here is what it would produce (click on image to get the full image view - it is big!):
Pretty amazing what 5 lines of auto tags / text in a static page can produce! This is where you can apply some creativity to create some very unique ways to present your information and organize it in cool ways!