Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

The new Gallery Module


Reply


28 Posts   21172 Views

Avatar
Hani

12 Posts

3 August 2007 at 11:35am

I'm so excited! This is going to be an amazing module when all is said and done. =)

To note: I extended FileRepository to create an "Audio Gallery" page that displays a list of audio files (specifically, MP3s) from an asset folder. It also gives a flash audio player button next to each.

The flash button I used is from Wimpy Player.

Direct page: [url]http://www.wimpyplayer.com/products/wimpy_button.html[/url]

Thanks to your module, this was really easy to set up!

Avatar
Matt

Core Development Team, 84 Posts

3 August 2007 at 12:01pm

Yeah, Wimpy is really cool. Nice work :)

Avatar
Ajm

3 Posts

2 September 2007 at 9:40am

Hi,

I'm new to SilverStripe and so far think it is the best and easiest i've used.

Could someone please give me an example of a GalleryPage.ss file or
where I should place the <% include GalleryPageContent %> in the Page.ss file.

The only place I can seem to get it to work is just before the include for the footer.

Regards

Andy

Avatar
Willr

Forum Moderator, 5513 Posts

2 September 2007 at 11:43am

If you are using the BlackCandy theme you can place <% include GalleryPageContent %> anywhere between lines 12-16 in the mysite/Layout/Page.ss file. This is what my one looks like..

<div class="typography">
   <% if Menu(2) %>
      <% include SideBar %>
      <div id="Content">
   <% end_if %>
         
   <% if Level(2) %>
       <% include BreadCrumbs %>
   <% end_if %>
   
      <h2>$Title</h2>
   
      $Content
      <% include GalleryPageContent %>
      $PageComments
   
   <% if Menu(2) %>
      </div>
   <% end_if %>
</div>

Avatar
Ajm

3 Posts

2 September 2007 at 7:50pm

Hi willr,

I have only just installed SilverStripe and am using the default which I thought was BlackCandy. Although looking at your Page.ss file it is different to mine.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/
DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >

<head>
<% base_tag %>
$MetaTags
<link rel="stylesheet" type="text/css" href="$project/css/layout
.css" />
<link rel="stylesheet" type="text/css" href="$project/css/typogr
aphy.css" />

<!--[if IE 6]>
<style type="text/css">
@import url($project/css/ie6.css);
</style>
<![endif]-->

<!--[if IE 7]>
<style type="text/css">
@import url($project/css/ie7.css);
</style>
<![endif]-->
</head>
<body>
<div id="BgContainer">
<div id="Container">
<div id="Header">
<h1>DBUnix</h1>
<p>Software By Design</p>
</div>

<div id="NavHolder">
<% if Menu(1) %>
<% include Menu1 %>
<% end_if %>
</div>

<div class="clear"><!-- --></div>

<div id="Layout">
$Layout
</div>

<div class="clear"><!-- --></div>
</div>
<% include Footer %>
</div>

</body>
</html>

The only place I can get it to work is before the <% include Footer %>

Regards

Andy

Avatar
Willr

Forum Moderator, 5513 Posts

2 September 2007 at 8:22pm

Andy, you are looking at the right template (BlackCandy) but the wrong file. That code is for the mysite/Templates/Page.ss file. Now as you can see, the theme has $Layout which calls other sub templates which is the one you need to edit, In this case its another file called Page.ss. The one inside mysite/Templates/Layout/Page.ss is the one you need to make sure looks like the one I posted

Avatar
Ajm

3 Posts

2 September 2007 at 8:54pm

Many thanks Willr.

Works great.

Regards

Andy

Avatar
The Frenchy

Core Development Team, 40 Posts

21 September 2007 at 6:40pm

The version 0.2 has been released. check [url=http://www.silverstripe.com/modules-discussion/flat/5639]this[/url].