Jump to content

ProcessSlider - Image sliders for ProcessWire


mauricius

Recommended Posts

@kongondo 

install all the three module in the MarkupSlider.Module file it not get the slider id if i place the slider id in the query slider is showing but the problem exist $sliderId is not getting the id from db

yes my error is on the same line if i pass the id in the getreplacement function in query in the place of :id  to 1the slider id in db its showing the slider 

Link to comment
Share on other sites

@kongondo 

install all the three module in the MarkupSlider.Module file it not get the slider id if i place the slider id in the query slider is showing but the problem exist $sliderId is not getting the id from db

yes my error is on the same line if i pass the id in the getreplacement function in query in the place of :id  to 1the slider id in db its showing the slider 

Make sure that the field that contains the ID of the slider is called exactly 'Slider1'. If you use only the instruction $page->get('Slider1'), without the module, it should print the ID of the slider.

Link to comment
Share on other sites

$page->get('Slider1') it returns nothing 

I'm starting to think that the documentation is not clear enough on this point, I should definitely add more information.

Let's try to explain better how the module works:

  1. Create your slider using the module, suppose that this slider is called Slider1.
  2. Define a field of type Slider and give it a name. I'm calling it slider.
  3. Add this field to an existing template, for example on the home template.
  4. Now go to your pages tree and edit the home page. On the slider field select the slider that you want to display on the page.

On your template file use the code $page->get('slider') to get the ID of the Slider1 slider, and pass it to the MarkupSlider module.

  • Like 1
Link to comment
Share on other sites

i filled the slider field in the template name home and get the slider on the same template file and place the code before body 


I'm starting to think that the documentation is not clear enough on this point, I should definitely add more information.

Let's try to explain better how the module works:

  1. Create your slider using the module, suppose that this slider is called Slider1.
  2. Define a field of type Slider and give it a name. I'm calling it slider.
  3. Add this field to an existing template, for example on the home template.
  4. Now go to your pages tree and edit the home page. On the slider field select the slider that you want to display on the page.

On your template file use the code $page->get('slider') to get the ID of the Slider1 slider, and pass it to the MarkupSlider module.

i do the same steps that you advised but it throws the error 

Link to comment
Share on other sites

i filled the slider field in the template name home and get the slider on the same template file and place the code before body 

i do the same steps that you advised but it throws the error 

I really don't know how to help you. Just make sure that $page->get('slider') returns a valid slider ID otherwise it will throw that error because you're trying to render NULL.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I'm really not sure if this works every time. Lately I have tricked my self with using dashes - - - in fieldnames and not underscores _ _ _ .

Fieldcreation was via API, where the fieldname was stored in a class constant: const MYFIELDNAME = 'my-new-fieldname'. The new fieldname of the created field worked out as: 'my_new_fieldname'.

Later in the code, where I want access one field with a selector like $page->get("name=" . CLASS::MYFIELDNAME), it doesn't work.

I'm not sure if this was with fields of type text / integer or only Page, but I perfectly remember that it hasn't worked. :)

----

There was also this: https://processwire.com/talk/topic/8709-croppableimage/page-2#entry86866 (read this and the two following posts)

Edited by horst
add link to related issue with croppableimages modules
  • Like 1
Link to comment
Share on other sites

This module is really great, thank Mauricius! Do you have any plan to support multilanguage website? I think now is not possible, right?

Ciao!

Thank you!

Unfortunately this module doesn't use any ProcessWire fields (except for the images). It works only with HTML, therefore at this point building multilanguage sliders is nearly impossible. The only way you could build multilanguage sliders would be creating each time a new slider.

However if you have access to your database you can easily use a little trick to speed up the process: add a new row in the slider table for each one of your languages. For example if you have German and English you can add two new rows (let's call them slider_de and slider_en) and you can copy and paste the code column to have the same settings as the original slider. Now you can translate your text in the administration section.

As the last step you have to change the type of the Slider field from Slider to TextLanguage. In this way you can reference a different slider for each language, but remember that you have to type in the ID of the slider and not the name.

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

I was able to load the slider images but not the actual slider. In Console it throws error JssorCaptionSlider not defined.

You have to make sure that the Jssor library is available in the folder /site/modules/ProcessSlider/jssor. Otherwise you can download it from the official website at http://jssor.com/download.htmlThe module uses only the files in the "js" and "img" folders, specifically the files "jssor.slider.debug.js" in development mode and "jssor.slider.min.js" in production.

Link to comment
Share on other sites

I would like to display a full width slider instead of size of pixels defined in ProcessSlider set up page. How can I get full width responsive slider?

Just check the Responsive/Full Width checkbox! However you still have to define the size of the slider in pixels. Ideally you should set the values based on the largest uploaded image.

Link to comment
Share on other sites

I use the latest PW (3.0.7) and unfortunately the slider doesnt fetch any images. I have tried it with 2 pages which have images, but no luck.

attachicon.giffyIII2mxw9.gif

Best regards

Unfortunately I haven't had the opportunity to play with PW 3 yet, so I don't know what's wrong here. Probably something is different in the way that PW fetches images. I'm quite busy by now, but I'll look into it as soon as possible, hopefully next week.

  • Like 2
Link to comment
Share on other sites

Edit to my last post:

Slider works, but if the Images are inside in a repeater field it doesnt fetch the images. I dont know if this is a usual behavior or not. If the Image field ist standing alone it will work in PW 3.0.7.

Best regards

Link to comment
Share on other sites

  • 1 month later...

Hi all,

I have strange problem with this module. My banner contains two slides and module renders both slides at once. Please take a took at screenshot. I would appreciate any help

You need to check if the Javascript code kicks in. Make sure to follow the instructions of the MarkupSlider module or make sure that you have all the JSSOR dependencies on your page.

Link to comment
Share on other sites

  • 1 month later...

Hi all,

I have strange problem with this module. My banner contains two slides and module renders both slides at once. Please take a took at screenshot. I would appreciate any help

I had the same problem and had to remove a part of SliderGenerator.php to make it partially work:

\$CaptionSliderOptions: {

\$Class: \$JssorCaptionSlider$,

\$CaptionTransitions : _CaptionTransitions,

\$PlayInMode : 3,

\$PlayOutMode : 3

},

Removing this, makes transitions between slides work. But animation of elements doesn't work. All elements of a slide are displayed at once. Something changed inside jssor.

Link to comment
Share on other sites

I had the same problem and had to remove a part of SliderGenerator.php to make it partially work:

\$CaptionSliderOptions: {

\$Class: \$JssorCaptionSlider$,

\$CaptionTransitions : _CaptionTransitions,

\$PlayInMode : 3,

\$PlayOutMode : 3

},

Removing this, makes transitions between slides work. But animation of elements doesn't work. All elements of a slide are displayed at once. Something changed inside jssor.

Yeah something might have changed in the last few months. As soon as I have a little bit of time I'm going to look into these recent issues with a new fresh PW 3 installation.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...