The Joomla! Forum ™





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: images in pattemplate
PostPosted: Wed Jun 06, 2007 10:14 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu May 17, 2007 7:18 am
Posts: 8
Hallo,
I need to show first image (from images column in sql) in my pattemplate, but I don't know how.
I don't know how get only first image name - in php something like this - strtok($row->images,"|\r\n").

Is this posible with pattemplates ?

Thank you


Top
 Profile  
 
PostPosted: Wed Jun 06, 2007 5:52 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Aug 24, 2005 7:20 pm
Posts: 200
Location: Los Angeles
I think you're going to want to do it in PHP with something like strtok() or explode() before passing it to patTemplate

Look in the com_content component to see how image lists are parsed. I believe they're separated by line returns \r\n but I could be wrong.


Top
 Profile  
 
PostPosted: Thu Jun 07, 2007 6:33 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu May 17, 2007 7:18 am
Posts: 8
When I do it in php, I must manually iterate each article, I can't have template for row.  :(


Top
 Profile  
 
PostPosted: Thu Jun 07, 2007 3:31 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Wed Aug 24, 2005 7:20 pm
Posts: 200
Location: Los Angeles
Well, patTemplate does have some basic ability to do php from the template, but it's wierd and it probably won't do what you need.

You may want to look at writing your own filter to patTemplate, then you could buid the special functionality you need.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 



Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group