Portal Engine
Version 3.x > Portal Engine > image slider that pulls resources from another page View modes: 
User avatar
Member
Member
st00z - 6/3/2010 6:39:03 AM
   
image slider that pulls resources from another page
Hi

its been a while since ive used kentico (i built a website with it a while ago and it is fantastic!) but ive been asked to make some changes to the site...

i need to know a simple way to setup a kind of image slider in a web part on the front page (like an "on special" area) and scoop the images in the webpage from a product page...

this could be easy or not i cant really remeber my way around, but im sure with some advice it will come back..

appreciate any input..


cheers
stu

User avatar
Member
Member
mckstu-gmail - 6/4/2010 3:16:29 AM
   
RE:image slider that pulls resources from another page
st00z wrote: Hi

its been a while since ive used kentico (i built a website with it a while ago and it is fantastic!) but ive been asked to make some changes to the site...

i need to know a simple way to setup a kind of image slider in a web part on the front page (like an "on special" area) and scoop the images in the webpage from a product page...

this could be easy or not i cant really remeber my way around, but im sure with some advice it will come back..

appreciate any input..


cheers
stu





actually ive found the content slider which is ideal for what im trying to achieve...

ive set it up...pointed it to a folder location in the website hierachy...and set a transformation of lightbox but for some reason it shows the numbers (of the images) an the 'image not found' symbol which means there something wrong with the transformation code that dosent pull the images and display them properly...if i click on the non displaying image it goes to a page with the picture...


can someone provide some suitable transformation code to display the images at a set size and then click through to another page in the website??????

quite desperate to get this going asap.

cheers
stu

User avatar
Member
Member
mckstu-gmail - 6/6/2010 9:03:46 PM
   
RE:image slider that pulls resources from another page
does anyone use this forum????

User avatar
Member
Member
gavin.eggheaddesign - 6/7/2010 3:07:12 AM
   
RE:image slider that pulls resources from another page
Hi

What code ion the transformation are you using to pull the image through?

have you tried something like '<img src="<%# GetFileUrl("FIELDNAME") %>" /> and changing the field name to what your image is stored under?

Thanks

Gavin

User avatar
Member
Member
st00z - 6/7/2010 7:18:47 AM
   
RE:image slider that pulls resources from another page
Gavin,

The content slider seems like it works (it fades between images) but the images arent being displayed...the location of the images and the transformations ive tried are below:


Node ID: 733
Node GUID: 26403d2f-89f2-436e-a945-d3eec98c9c78
Alias path: /page-graphics/Product-Specials


Ive tried each of the following lines in my transformation:


<%# GetImageByUrl("~/getfile/26403d2f-89f2-436e-a945-d3eec98c9c78/", 200) %>

<img src="<%# GetImageByUrl("~/getfile/26403d2f-89f2-436e-a945-d3eec98c9c78", 200) %>" />

<img src="<%# GetImageByUrl("~/getfile/page-graphics/Product-Specials/%", 200) %>" />

<img src="<%# GetFileUrl("~/page-graphics/Product-Specials/%") %>" />

<img src="<%# GetFileUrl("26403d2f-89f2-436e-a945-d3eec98c9c78") %>" />

<img src="<%# GetFileUrl("Product-Specials") %>?maxsidesize=120" />




Not to sure what your referring to with ("FIELDNAME")...is that something i need to define in the "fields" tab under document types??...All i want it to do is display (in slider form) 5 pictures which sit in a folder under my site heirachy in (didnt think it would be such a challenge)...

Any other ideas?

Thanks for any assistance in advance...sorry about long reply.

stu

User avatar
Member
Member
gavin.eggheaddesign - 6/7/2010 7:41:18 AM
   
RE:image slider that pulls resources from another page
Hi Stu

Basically the text within (" ") on the below code is the 'Attribute name' that stores the image when creating the document type. (listed under field types)

So for example it could be called 'ImagesThumb' so you would just add to the code like below...

<img src="<%# GetFileUrl("ImageThumb") %>" />

Hope this makes sense and works

Let me know if i have missed something

Thanks

Gav

User avatar
Member
Member
st00z - 6/7/2010 7:59:34 AM
   
RE:image slider that pulls resources from another page
Thanks for the quick reply Gavin...

i understand the code of the attribute youve given above now im just not sure how/where to define the properties of "ImageThumb"..how do i make this attribute display the pictures from the below directory to a size specification..is this done in the "document types > fields" tab??

/Page Graphics/Product Specials/...

<image1.jpg>
<image2.jpg>
<image2.jpg>
<image2.jpg>
<image2.jpg>


To make sure i havent configured anything wrong in my webpart properties ive included the settings below....


Webpart properties (Content slider)

Alias path: /home
Zone ID: zoneRight

ID: ContentSlider

Visible: False

Hide on sub-pages: False

Show for document types:

Display to roles:


Content


Path: /page-graphics/Product-Specials/%


Content filter


Document types:

Combine with default culture:

Culture code:

Maximum nesting level: -1

ORDER BY expression:

Select only published: True

Select top N documents:

Site name: AmericanVehicleSales

WHERE condition:

Filter out duplicate documents: False


Transformations


Transformation: cms.ImageGallery.Index_SpecialsSlider

Alternating transformation:

Item separator:

Nested controls ID:


Relationships


Main document: 00000000-0000-0000-0000-000000000000

Main document is on the left side: False

Relationship name: isrelatedto


System settings


Check permissions: False

Cache item name:

Cache minutes:


No data behavior


Hide if no record found: True

No record found text: No data found


Div options


Width (px): 225

Height (px): 121

Style:


JavaScript options


FadeIn time (milliseconds): 1000

FadeOut time (milliseconds): 1000

Break time (milliseconds): 3000

Auto start: True


HTML Envelope


Web part container:

Web part container title:

Content before:

Content after:

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 6/7/2010 8:42:15 AM
   
RE:image slider that pulls resources from another page
Hello,

Yes, you can find the field name in Site manager -> Development -> Document types -> Fields (it should be the document type of your images - for example CMS.File and field name: FileAttachment).


Best regards,
Helena Grulichova

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 6/7/2010 6:13:52 AM
   
RE:image slider that pulls resources from another page
Hello,


could you please try a non-Lightbox transformation? You can also create a custom one. Here is more information: Writing transformation.


Best regards,
Helena Grulichova

User avatar
Member
Member
st00z - 6/7/2010 7:29:14 AM
   
RE:image slider that pulls resources from another page
im using the following transformation:

"cms.ImageGallery.Index_SpecialsSlider"

I made a new one under the cms.imagegallery document type..is this right...alsodo i need to make a field type for the image...developers guide is a bit thin on detail.

thanks for help.
stu

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 6/7/2010 8:08:33 AM
   
RE:image slider that pulls resources from another page
Hello,


are the images of CMS.File document type? (http://devnet.kentico.com/docs/devguide/file_management_overview.htm). If so, the field name is FileAttachment. I would recommend you installing a sample Corporate site where you can see all web part working in the Examples section.

The Tutorial for Corporate site is here: http://devnet.kentico.com/docs/tutorial/index.html


Best regards,
Helena Grulichova

User avatar
Member
Member
st00z - 6/8/2010 5:36:22 AM
   
RE:image slider that pulls resources from another page
helena

thanks for the help..im still stumped why the images in the folder at the path ive defined wont display? should i reupload them to the folder...

ive made the transformation point to:

"CMS.File.Index_SpecialsSlider"

and the code in the transformation is as below:

<img src="<%# GetFileUrl("FileAttachment") %>" />

still only the symbol for no picture fades in and fades out. Images arent working?

im really stumped?

stu

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 6/8/2010 9:25:10 AM
   
RE:image slider that pulls resources from another page
Stu,


could you please confirm me that you upload images as CMS.File documents?

Do you use workflow?

If you find one of images in the content tree and click on the Live site (next to Preview and Edit button) can you see the image correctly?

If you view the source code of rendered HTML page what is the src property (URL)
of images?


Best regards,
Helena Grulichova