Jump to content

Text slider


visualcookie
 Share

Recommended Posts

1) Options you could setup a reapterfield

2) Use the PageTable field type

- create a page template for your quotes that only output the quote

- you could use the quote pages as children where you need them - or if you have them in several places you could create a special hidden page and get them via API or in Content via HannaCode

some links on this topic

https://processwire.com/talk/topic/6417-processwire-profields-table/page-2#entry63119

https://processwire.com/talk/topic/8177-page-table-howto/

some example setup for PageTable or PageTableExented fields:

https://processwire.com/talk/topic/7459-module-pagetableextended/

regards mr-fan

  • Like 2
Link to comment
Share on other sites

common way for quotes is:

1.) Make quote template, add necessary fields (body, author, link etc.)

2.) make quote-index template (children allowed = quote)

3.) set quote template for parents allowed = quote-index

4.) in a hidden part of your tree (e.g. /settings/quotes/) add new page using quote-index template

5.) add quote pages as children of the quote-index

6.) change quote-index template to disallow new pages to be created

7.) to output your quotes, (replace nnnn with the id of your quote index)

<?php

$quotes = $pages->get(nnnn)->children;
//or
$quotes = $pages->find("template=quote");

foreach($quotes as $quote) {

    // output your quote markup here,
    // e.g. echo $quote->body;

}
  • Like 2
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...