visualcookie Posted August 3, 2015 Share Posted August 3, 2015 Hi guys, I used the search but didn't find any topic that talks about these things. I've a text slider (quotes) and want them to be edited in the backend. Is this possible and how would I do this? Hope to find some answers. Link to comment Share on other sites More sharing options...
mr-fan Posted August 3, 2015 Share Posted August 3, 2015 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 2 Link to comment Share on other sites More sharing options...
Macrura Posted August 3, 2015 Share Posted August 3, 2015 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; } 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now