Image Folder Manifests

Image manifests are new in sb_portfolio 2.7.0. They allow you to give all the images from image folders a title and a description or whatever other information you want to add. The information can be translated and can then be used in image and image link attributes. They can also be outputted inside the imagegrid.

Allows you to create an online portfolio with TYPO3, whatever your medium
Comes with 16 display modes - all record types come with a grid and list display mode
Allowing you to work offline on your portfolio during a site redesign
Shows statistics about your portfolio and gives you the ability to edit portfolio records en masse
Many hooks exist allowing you to extend sb_portolio - this including adding new display modes
Allow you to add your own content to sb_portfolio's output. Anything you can create in TypoScript can be added
All records can be translated
Inbuilt support for comments, ratings and pagebrowse extensions. Works with realurl/cooluri

What are manifest files?

Image folder manifest files are just TYPO3 XML language files, this means the information in them can be translated! Each image folder can have one file, and in it you should put all the information about an image that you need.

Here is an example of such a file:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3locallang>
    <data type="array">
        <languageKey index="default" type="array">
            <label index="image1.title">image 1 title</label>
            <label index="image1.description">image 1 desccription</label>
            <label index="image1.fulldescription"></label>
            <label index="image2.title">image 2 title</label>
            <label index="image2.description">image 2 desccription</label>
            <label index="image2.fulldescription">image 2 full desccription</label>
        </languageKey>
        <languageKey index="de" type="array">
            <label index="image1.title">image 1 title de</label>
            <label index="image1.description">image 1 desccription de</label>
            <label index="image1.fulldescription">image 1 full desccription de</label>
            <label index="image2.title">image 2 title de</label>
            <label index="image2.description">image 2 desccription de</label>
            <label index="image2.fulldescription"></label>
        </languageKey>
    </data>
</T3locallang>

The file must be called "sbp_manifest.xml". Each folder should have it's own file.

Note that not every image needs to have every field, and above you will also see that the information has a German version to. For each language, just create a new languageKey tag.

Each label tag should start with the image name followed by a field name (with a dot in between). If your image is called testimage.png and you want a title and description for this image you would need to add the following label tags to the file:

<label index="testimage.title">image 1 title</label>
<label index="testimage.description">image 1 desccription</label>

You can then output the content of these markers in the item subpart of the imagegrid template or you can use them in your image and image link configs.

Also, the information is outputted in the JavaScript marker in case you want to use it.

Image and Image Link Configs

An example:

plugin.tx_sbportfolio_pi1 {
  displaySingle {
    lightBox = 1
    lightBox {
        linkConfig.title.field >
        linkConfig.title = manifest:description
        imageConfig.altText = manifest:title
        imageConfig.titleText = manifest:fulldescription//description
    }

    imageGrid {
      lightBox = 1
      lightBox {
        linkConfig.title.field >
        linkConfig.title = manifest:description
        imageConfig.altText = manifest:title
        imageConfig.titleText = manifest:fulldescription//description
      }
    }
  }
}

You can use the information in a link's title attribute or an image's alt and title attributes. The syntax is:

manifest:field_name

You can add several fields after "manifest:", just separate them with "//", e.g.

manifest:fulldescription//description

In the above example, the field fulldescription will be used, but if the manifest file doesn't contain a fulldescription field for an image, it will then use the description field. You can put as many fields in the list as you want, and sb_portfolio doesn't use any set fields, so you can call them whatever you want in your manifest file.

Imagegrid item subparts

You can also output the content of the manifest files in the imagegrid template's item subpart. Markers should be like this:

###M_FIELDNAME###

so if you have a fulldescription field in your manifest file, the marker for it is:

###M_FULLDESCRIPTION###

Here is an example of using the markers in an image grid (set to output as list)

###TEMPLATE_LIST###
    <ul class="portfolioList">
    ###FILTER###
   
    ###CONTENT###
        ###ITEM###
        <li class="portfolioItem###CLASSES###">
        ###L_TITLE###
        ###L_DATE###
        ###L_SUMMARY###
        </li>
        ###ITEM###

        ###ITEM_IMAGEGRID###
        <li class="portfolioItem portfolioImageGridItem###CLASSES###">
          ###IMAGE###
          ###M_TITLE###
          ###M_FULLDESCRIPTION###
        </li>
        ###ITEM_IMAGEGRID###
    ###CONTENT###
   
    </ul>
    ###PAGE_BROWSER###
    ###IMAGE_JS###
###TEMPLATE_LIST###

When used like this, as markers, they can also be wrapped. As the above imagegrid is list you would need to add the wraps to the list display mode:

plugin.tx_sbportfolio_pi1 {
  displayList {
     wraps {
       m_title_stdWrap.wrap = <p class="manifestInfo imageTitle">|</p>
       m_fulldescription_stdWrap.wrap = <p class="manifestInfo imageFullDescription">|</p>
    }
  }
}

For the next version of sb_portfolio an additional BE Module function will have been created to help create and edit these files. Until then you'll have to create them yourself and upload them to the folders in fileadmin using an FTP client or TYPO3's filelist module.

How To's

What's your opinion?

Do you have any comments about what you have read?

Let me know what you think!

Support

If you have used sb_portfolio and want to show you appreciation feel free to donate to sb_portfolios development, or buy me something from my amazon wishlist.

Current Version

2.8.4

Extend SB Portfolio

SB Portfolio Extended

Demonstrates how to extend SB Portfolio using the hooks to add new markers and display modes. Not intended for production sites.

SB Portfolio SEO

Automatically adds metatags (description and keywords) as well as facebook supported Open Graph metatags.

Found a bug?

Report it here at the TYPO3 Forge.

Comments

There are none! Why not be the first?

Your Comment

All fields are required