Search the Community
Showing results for tags 'single'.
-
I'm building a template for a one page website and have run into a small problem with the admin view page links. Because my site is built with content blocks rather than pages there is no header and footer for each block, only the homepage needs to pull in the header and footer for the site. As a result clicking to view a page in the admin shows the page content but with zero styling. This is obviously not ideal for clients so I'd like to find a better solution. Here's a rough idea of the site structure: Home (header & footer) Page 1 Content Block 1 Content Block 2 Page 2 Content Block 3 etc etc My page's use an anchor # for the url eg #contact so Ideally when the user clicks on the page they'd be redirected to that relevant anchor. I know this might be complicated to achieve so all I really need to do is redirect all pages to the homepage (parent). Any idea how I would go about this?
-
I've been putting together a simple lightbox gallery using prettyPhoto. I have this working but I only want one thumbnail to launch the gallery and at the moment I'm getting one thumbnail for each image. Apologies for my poor php skills, I know this is coming from the echo but don't know how to display <img> only for the first list item. Here's my code: <ul id="gallery1"> <?php foreach($page->images as $img) { $thumb = $page->thumbnail->size(220, 200); echo "<li><a href='{$img->url}' rel='prettyPhoto[gallery1]'><img src='{$thumb->url}' alt='{$thumb->description}' width='{$thumb->width}' height='{$thumb->height}' /></a></li>"; }?> </ul> And my original code: <ul id="gallery1"> <li><a href="assets/library/image01.jpg" rel="prettyPhoto[gallery1]"><img src="assets/library/thumb1.jpg"/></a></li> <li><a href="assets/library/image02.jpg" rel="prettyPhoto[gallery1]"></a></li> <li><a href="assets/library/image03.jpg" rel="prettyPhoto[gallery1]"></a></li> </ul> Any help would be greatly appreciated.
- 4 replies
-
- lightbox
- prettyphoto
-
(and 3 more)
Tagged with: