Create Custom Layouts

Custom layouts are probably the single most powerful feature in PhotoSmash. Probably even more powerful than letting your users upload images to your site, but hey, you don’t have to choose! They’re both in there.

This step-by-step will get you started on creating custom layouts.  I don’t have time right now to make it pretty and add pictures, but I’ll try to tell you what you need to know.

Creating a Custom Layout

  1. First, you need to make sure you have the Advance Menu items showing.  Go into PhotoSmash Setting / Advanced tab, make sure “Show Advanced Menu Items:” is checked…save it if it wasn’t
  2. Now you should see a menu item for Layouts Editor…go there
  3. Next, we’ll copy the Std_Widget layout to a new Custom Layout so if something goes awry, you’re still covered…Select Std_Widget from the drop down and click Edit
  4. Change the Drop Down back to <new> (don’t Edit or Save yet)
  5. Change the Layout name to something new, like ‘test_layout’
  6. Click Save Layout
  7. You now have a brand new layout that was identical to Std_Widget (which is the default layout for Widgets).  It will appear in the drop down in Gallery Settings, so you can specify it as the default layout out for your Galleries.  You can also call it in your shortcodes by using layout=’test_layout’ (or whatever you named it.

Be brave…copy and explore the other standard delivered layouts and see how they work.  Note that the Gallery_Viewer layout is a special layout for the Gallery Viewer.  It doesn’t work well at all for displaying the images within a gallery, though you can use it for that…it’s just really not good for it.

Notice all of the fields that you can reference in your layouts, listed on the right hand side.  It also shows you your custom fields if you’ve added any.

You can add html, javascript, you name it, to your layouts.  Really, your imagination is the only limitation…well, that and you can’t add PHP code to it.  But I’m considering letting you add shortcodes that can process PHP code…we’ll see.

I will do a movie on this at some point!

Post any questions in the Forums.

Cheers,
Byron