SimonCox.com

Version 7.1

Assets for ExpressionEngine

by Simon Cox

2011-07-03

Articles
Web


Assets for ExpressionEngine

Assets is a new file management add-on for ExpressionEngine and brings a new way of managing assets in your website. I installed it and built a simple image Gallery.

Installing Pixel & Tonics new Assets add-on

This week Pix­el & Ton­ic have released Assets, a new file man­age­ment add-on for Expres­sio­nEngine. This is an area of con­tent man­age­ment that has been lack­ing in the past but has been improv­ing with EE2 — but Assets takes file man­age­ment to a new level.

The exten­sion installs as most do — files going into the third par­ty fold­ers in the sys­tem fold­er and the themes fold­er and then a quick click on the install link in the Add-ons con­trol pan­el and it’s installed.

In the left pan­el of the add-on inter­face, you can see the fold­er struc­ture — right-click­ing on a fold­er allows you to add sub­fold­ers with a pop­up that allows you to name the sub­fold­er. Assets can be dragged between fold­ers and impor­tant­ly, if your code is using the Assets tags and para­me­ters rather than direct urls, then the paths will change auto­mat­i­cal­ly in your tem­plates allow­ing you to reor­gan­ise your assets quick­ly and easily!

I thought I would add an image gallery to the arti­cle pages on this web­site. First I added an Asset entry field into my arti­cles field­set and named it page­gallery’. Next, I added the HTML (in Coda and using Moun­tee because I love the com­bi­na­tion!). The code sits with­in the exp:channel:entries’ tags and I set up a descrip­tion list as I want­ed to add cap­tions to each image.

This is the code

{if pagegallery} <h3>Gallery</h3> <dl class="pagegallery"> {pagegallery} <dt><img src="{url}" width="100%" height="100%" alt="{alt_text}" /></dt> <dd>{title} by {author} - {date format="%D, %F %d, %Y"}: {location} {caption}<dd> {/pagegallery} </dl> {/if}

The if’ state­ment means that the code is used only if the page­gallery has some con­tent. The {page­gallery} tag is the one named in the field set and will loop until all entries are com­plet­ed. The Assets vari­ables (full list over at Pix­el & Ton­ic) are used to pro­vide the cap­tion con­tent and are pulled out of the image meta data.

I could have made this more com­plex with a thumb­nail gallery or carousel to show the images, but for now, I am con­tent with this and exam­ples can be seen below and on the Vin­tage Trac­tors arti­cle.

Assets will, I pre­dict, quick­ly make it into the default set up add-on lists that Expres­sio­nEngine devel­op­ers use — it’s awesome!

And there is more...

4th July — small update to the look and feel of the gallery piece — added dark back­ground to pop out the images. Meant to do that yes­ter­day but time defeat­ed me!

Jan­u­ary 2018

Some time back Pix­el and Ton­ic decid­ed to focus sole­ly on Craft CMS and so EE Har­bour has tak­en on Assets for Expres­sion Engine

Assets for ExpressionEngine Gallery

Other articles in this topic

A first look at Safecont content quality analysis SEO tool

Review of a new tool from Data elasticity S.L in Spain that analyses the quality of your websites content Read more about A first look at Safecont content quality analysis SEO tool

How to find insecure pages in your site before Google start penalising them

Google will be highlighting all non-secure sites from July 2018 meaning that the Insecure Content Report of Screaming Frog will be in use a lot over the next few months - I will show you what to do. Read more about How to find insecure pages in your site before Google start penalising them

How I add canonicals into Perch CMS sites

The Canonical link in a page's header lets the search engines know where the original page resides. Originally conceived for situations where articles were duplicated they would reference the original. Google tends to choose the oldest version of a page that it can find (but not the only method it uses) and any other pages with the same or very similar content are considered duplicates and will not do a well on the Search Engine Results Pages - SERPs and we want our pages to do well there for the traffic. Read more about How I add canonicals into Perch CMS sites

Using a CDN to help migrate your sites hosting

Moving a site to new hosting can be fraught with issues. Here is one technique that I find useful when moving to a website to a new hosting server. Read more about Using a CDN to help migrate your sites hosting

EU cookie consent law largely ignored

The EU has give the UK until May 28th 2012 to comply with the cookie consent law - how many of the organisations pinpointed by the ICO have met the deadline? Read more about EU cookie consent law largely ignored

HTML Test Page for CSS Style Guide

This content is used to test that css has been covered for all tags used in content. Read more about HTML Test Page for CSS Style Guide

EEUK11 report

The UK's first ExpressionEngine conference has taken place in Manchester in August 2011. I provide a report on the event itself and the surrounding activities. Read more about EEUK11 report

Responsive web design

Responsive web design has been emerging as a way forward over the past two years. Following inspiration from the way Simon Collison's crafted his personal website I have now implemented a Responsive Web Design on this, my personal website. Read more about Responsive web design

WebFonts

With HTML5 finally emerging from the primordial soup I thought it was time to have a look at where we have got to with fonts on the web, what today's techniques are and what is new in the world of the digital hot metal. Read more about WebFonts

Nibbler

Online testing suites are a very useful way of checking your website to see if it's up to scratch. I take you through Nibbler from Silktide. Read more about Nibbler

New look for 2010

I have finally taken the plunge and updated the site and have switched over to ExpressionEngine. Read more about New look for 2010

Comments