Jump to content

Slider with just text


Gary
 Share

Recommended Posts

Hi

I am an extreme newbie to Process Wire. Does anyone know of a simple to follow tutorial on installing a slider but with live text instead of images. Or if not, just a basic slider with images.

Thank you

Link to comment
Share on other sites

Hi @Gary,

you could:

  1. Install the core module Repeater
  2. Create a repeater field "slider"
  3. Create a textarea field "textarea"
  4. Add the textarea field to your repeater field "slider"
  5. Add the repeater field to your template
  6. Add content to the repeater in your page

Then you could output your repeater in your template file like this:

<?php if (count($page->slider)): ?>
    <ul class="slider">
        <?php foreach ($page->slider as $slide): ?>
            <?php if ($slide->textarea): ?>
                <li class="slide">
                    <?=$slide->textarea?>
                </li>
            <?php endif; ?>
        <?php endforeach; ?>
    </ul>
<?php endif; ?>

The HTML markup depends on what slider plugin for the fron-end you want to use.

Regards, Andreas

Link to comment
Share on other sites

Thanks everybody! I will try them out.

Thanks AndZyk for your suggestion. Just a quick question. You said "The HTML markup depends on what slider plugin for the fron-end you want to use. ". What do you mean by that? I am extremely new to ProcessWire.

Thanks for you reply Benard. I am vaguely familiar with PHP and javascript. I know html and css much better. A client is using PW and wants us to make some edits.

Thanks Ottogal. I will certainly check out the link you provided.

Link to comment
Share on other sites

On 6/10/2022 at 5:39 PM, bernhard said:

you are missing one closing bracket before the :

Thank you for the correction. ?

On 6/10/2022 at 4:01 PM, Gary said:

Thanks AndZyk for your suggestion. Just a quick question. You said "The HTML markup depends on what slider plugin for the fron-end you want to use. ". What do you mean by that? I am extremely new to ProcessWire.

This is not related to ProcessWire, but depending on wich slider-plugin or own slider-solution you want to use, the CSS classes or even the HTML markup would be different.

For example:

Regards, Andreas

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...