<?php
/**
 * Webdesign-Referezen
 */
class webdesign_data extends fl_data_structures_data {
	public function get_link() {
		$lightbox = ( $this->has_local_url() )? ' rel="lightbox"': ' target="_blank"';
		$link = '<a href="'. $this->get('url') .'"'.$lightbox.'><img src="/public/img/web/teaserbilder/excerpt_'. $this->get('shortname') .'.gif" width="189" height="125" alt="'. $this->get('title') .'"></a>';

		return $link;
	}

	private function has_local_url() {
		$url = $this->get('url');
		return ( $url[0] == '/' );
	}
}
