Jump to content

Search the Community

Showing results for tags 'retrieving'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. I didn't exactly just start using ProcessWire. But does anyone know how would I go about retrieving the pages with a certain tag into separate sections based on their parent? Problem lies in the fact that both photos and featurettes (videos) share the same tags, and their thumbnails have a different aspect ratio. Which is pretty much why I'd like to have them separated, if a certain tag has been used on both content types. Parent names are "photos" and "featurettes". Needless to say, the current code isn't really good nor a beauty to look at. But I've attached it, and I'd appreciate any help. $thisTag = $page->title; $tdsphotos = wire("pages")->find("tagsx.title=$thisTag, limit=8, sort=-created"); $pagination = $tdsphotos->renderPager(array( 'nextItemLabel' => "Next", 'previousItemLabel' => "Prev", 'listMarkup' => "<ul class='pagination'>{out}</ul>", 'itemMarkup' => "<li>{out}</li>", 'linkMarkup' => "<a href='{url}'>{out}</a>" )); echo "<div class=\"littleboxes\">\n"; foreach($tdsphotos as $tdsphoto){ $otep = $tdsphoto->images->first(); $thumb = $tdsphoto->images->first()->size(210, 210); $out .="<div class=\"inabox\">"; $out .="\n<a href=\"{$tdsphoto->url}\"><img alt=\"{$otep->description}\" title=\"{$otep->description}\" class=\"img-thumbnail img-responsive\" itemprop=\"thumbnailUrl\" src=\"{$thumb->url()}\" width=\"{$thumb->width}\" height=\"{$thumb->height}\"></a>"; $out .="<h6 itemprop=\"name\"><a href=\"{$tdsphoto->url}\">{$tdsphoto->title}</a></h6>"; $out .="\n</div>\n"; } echo $out; echo "</div>\n"; echo $pagination; Thanks!
×
×
  • Create New...