Help with full urls in themes
2005
Joined: 2008-01-16
Posts: 4 |
Posted: Thu, 2011-03-17 07:38 |
Looking to use adjusted full image urls in theme files, photo.tpl and album.tpl. Matrix theme. Using URL Rewrite/htaccess. For photo.tpl I'd like to change this call/link: Quote:
{g->image id="%ID%" item=$theme.item image=$image I'd like to prepend that with http://whateveriwant.domain.com/ Right now, it's relative, and I'd like to hard code into the template something different than the Request URI. I can do that with the full size image using Quote:
<img src="http://whateveriwant.domain.com{g->url arg1="view=core.DownloadItem" arg2="itemId=`$theme.item.id`"}" class="%CLASS%" /> But I currently use resized images in the page, and the above url only pulls full sized. Is there template-based url coding I can use to call medium sized images into the template? Like adding arg4="size=resized" or something? For album.tpl Id like to change this call/link: Quote:
{g->image id="%ID%" item=$child image=$child.thumbnail I'd like to prepend that with http://whateveriwant.domain.com/ Right now, it's relative, and I'd like to hard code into the template something different than the Request URI. I can do that now, and it works for everything other than the top level category. The relative-ness changes there, and the thumbs break. Quote:
<img src="http://whateveriwant.domain.com{g->url arg1="view=core.DownloadItem" arg2="itemId=`$child.thumbnail.id`"}" class="%CLASS%" /> So that works everywhere but the top level. Is there a template conditional I could add "If gallery home, this, else, this prepend action" For both, I can not use forcefull because I want to change part of the url that is "in the full" Possibly turn the g->url forcefull into a variable, then preg_replace it right there in the template? That possible? Pulling my hair out, any help appreciated. Thanks for reading. - A
|
|