9 years ago
4
Topic

I am trying to get my an image upload field value in the article category module (field name is: main_image).  The field is using custom storage and is mapped to "images".

When I place this in my template "<?php echo $item->images; ?>"  I get "::main_image::images/articles/16/2004lamborghinigallardo.jpg::/main_image::"

When I try "<?php echo CCK_Article::getValue( $item->id, 'main_image' ); ?>" I get nothing.

How do I access the actual URL for the image?

Thanks!

Get a Book for SEBLOD
9 years ago
0
Level 1

Hello neosdesign,

welcome on SEBLOD forum.

The custom storage is only necessary for FieldX and GroupX. 

In 99% of case, you must use the STANDARD storage.


Best regards.

Lionel

9 years ago
1
Level 1

Looking through this thread:

http://www.seblod.com/v2/forum/108-Tips-and-tricks/28509-Get-values-from-fields-anywhere.html?limit=15&start=30

I was under the impression that custom storage is much easier to access since I just had a quick line of php as opposed to a database query.

9 years ago
0
Level 2

How do I get just the url from this: " ::main_image::images/articles/16/2004lamborghinigallardo.jpg::/main_image:: "

9 years ago
0
Level 1

Hello neodesign,

simply with a str_replace in PHP.

But like said previously, it's better to use the STANDARD storage.


Best regards

Lionel

Get a VIP membership