I am busy moving my site acros from wordpress to silverstripe and I am having a wee bit of a problem figuring out how to recreate my image rotator. You can veiw my wordpress example here http://www.arctosdesign.com/wordpress
here is how it works in wordpress:
<?php query_posts('tag=featured'); ?>
<?php while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink(); ?>" target="_self"><img id="feature_image" src="http://www.arctosdesign.com/images/<?php $values = get_post_custom_values("featured"); echo $values[0]; ?>" /></a>
<?php endwhile; ?>
This basically just searches for posts I have created with the tag "featured" and then I have created a custom field with name featured this holds the image that will be displayed.
Then this jQuery script creates the slider.
jQuery(function() {
jQuery('#feature').cycle({
prev: '#prev',
next: '#next',
timeout: 6000,
after: onAfter,
});
onAfter.apply(jQuery('td a:first')[0]);
});
function onAfter() {
jQuery('#output').html("Current anchor: " + this.href);
}
which basicly just cycles through the images from the custom fields in posts with featured tag.
however like I said I want to do this in Silverstripe but I am having some problem figuring out how to do this exactly. I don't know how to make custom field ( if silverstirpe even uses them...I think it uses just fields. am I right?). I am wanting it to display my portfolio work(I'm not really a coder I'm a designer hence why I am finding this transition difficult) so if I created a new sub page for a new portfolio item how then could I add to that page (A) a tag like the "feature" tag in wordpress and (b) how can I make a field that would allow me to attach the image.
Any ideas? I would really appriciate any help.
Thanx
Daimz