Search the Community

Showing results for tags 'tags'.



More search options

  • 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

  • ProDrafts
  • ListerPro
  • ProFields
  • ProCache
  • Form Builder
  • Likes
  • ProDevTools
  • Custom Development

Categories

There are no results to display.


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 37 results

  1. After enable the Tags File Compiler module, echoing variables with brackets syntax doesn't work. I try something simple like {page.title} and is displayed like the tag isn't parsed: {page.title} This problem happens with PW 3.0.108, i have another installation with 3.0.82 and it works. Any Ideas? thanks.
  2. Hey there, is there really no way to turn the OR logic into an AND logic when selecting pages by (e.g.) tags? so instead of $pages->find("template=exhibitions, tags=foo|bar") something like $pages->find("template=exhibitions, tags=foo&&bar") so the pages needs to have all requested tags, not just any of them. Thanks, Stefan
  3. Hello, I have created a field of type Page Reference and input field type Page Auto Complete, so that users of role 'writer' can add new tags to their articles. However, only a superuser can add new tags through the field, even though 'writer' roles have the permission to create pages of template 'tag', and the permission to add children in the parent template. New tags in the Page Tree can be added normally. Is there something I am missing?
  4. I have a "strange" issue with my dev set up, that I just noticed today. I set up an image field named "dev_gallery" and checked the "use tags" option when setting it up. I went to add a couple image to the field, and noticed that the tags option is not displaying at all for the image. Currently, the description field is the only current field on image edit. Have I missed a basic setting to enable this? I am currently using PW 3.0.62 as well.
  5. Hi, I just discovered Processwire recently and glad that I found it. I am trying to understand how to create Tags. I know HTML and CSS basics and tiny bit of PHP. I've just read most posts about making tagging system and still confused. Maybe because of my coding skills. From what other people wrote I could understand these: *I should create one field called Tags (this Tags field will be available for posts that i create so that I can type in tag name in it/ or choose from?!?! not quite sure how it will automatically appear in my Tags folder, or maybe I should create each and every tag page under Tags manually) *I should have one template php file called tag.php for each tag page (or two template php files for both Tags parent page(tags.php) and tag children pages(tag.php)) *I should create a Tags page which is the parent for real tag pages So the order I am thinking of to do is like: - create a hidden "Tags" page (which will contain my tag names as pages) under my Home page - assign a template for this page, but not sure what kind of template it will be?!? a template with a php file or without a php file? If with a php file, then what code i shall write in?!? - create a "Tags" field with Type as "Page"; Input -> "Parent of selectable page(s)" as "Tags", "Input field type" -> AsmSelect; "Allow new pages to be created from field?" checked. But i don't know what kind of template to assign for "Template of selectable page(s)" and what code to put inside that template file if it should be a php file. - create one or two php template files. Is that correct? - create my tags under Tags - create a page just to display the list all the tags and if a click on a tag name then i will get a list of all pages with that tag Basically, i think I have no idea about what to write in the template file(s) for the tags. I really want to make a very simple list of tags just for the sake of understanding so I can go from there. Tags will be really necessary for my website. When i looked at the tag.php, tags.php in Ryan's blog, i could not understand very well. Because there were other codes mixed and calling function from blog.inc, main.inc, nav.php. And it totally made me confused as I am not good at coding. Can someone please guide me please, possibly step by step like in the tutorial "Planets" or "Basic website" in Wiki? I really want to learn and I think Processwire is fast and great.
  6. taoguang

    Hello, I follow this post to add tags Now in my template: $tags = explode(',', $page->tags); foreach ($tags as $tag) { $tag = trim($tag); echo $pages->find("tags=$tag"); } But I just display the tags ID, How to display tags page's title?
  7. Hi Everyone! Wondering if the community can help me out on the following issue I'm struggling with; I'm using a Page titled Tags, with children Pages for separate Tags (a Tag, maybe obvious, but still...) These tags are being used as...tags! From a dropdown on the article-page in the CMS. Works like a charm. But... I actually want to use these tags as cross-reference as well. Basically I want to make a page with all tags on it, and for each tag have a list with all the Pages it's connected to (and preferably even pull content from those pages). Might be I overlooked a previous post on this subject, or that there's a Module for these kind of things, but since I couldn't find anything so far, I thought I'd try my luck here! Ideas, options, solutions, suggestions...all welcome! Thanks!
  8. fbg13

    Hello! I just found processwire yesterday (actually i heard about it before, but never looked into it) and installed it to play around. I'm really impressed, as a guy who only used wordpress i like it very much and i tried to replicate one of my sites in processwire and so far it seems doable, the taxonomies will be a little tricky i think. Now to the main point, i've read a blog post here giving some tips, one tip was to use only one image field and to group images by tags. The problem: there doesn't seem to be a way to add a tag to multiple images at once, making the process inconvenient. Would it be possible to add a prompt for defining a tag before selecting the images and the uploaded images will have that tag.
  9. pmichaelis

    Hey, I would like to add tags to an image field upload via api. Does anybody have some information on that? im using the following code to update images on a page. # remove images if(count($page->images)) { $page->images->deleteAll(); $page->save(); } # upload images foreach($product->image as $image) { $page->images->add($image->url); $page->images->tags = ? // not working } $page->save(); During Page Update the backend says: Session: Item 'tags' set to ProcessWire\Pageimages is not an allowed type Thanks for help.
  10. Hi, I'm trying to figure out if it's possible to add a "field" of some sort to the templates. See, this "field" isn't exactly a like the regular fieldtypes that would have different values depending on the pages that use that template. What I'm looking for is almost exactly the same as the Tags field in the advanced tab of the template settings. My use case scenario is that I want to put some keywords in there that would be available to all the pages using a particular template, and then I could perhaps use those values to determine dependencies, etc. I could actually achieve this with the existing tag field, but then it messes with the templates list because they appear multiple times depending on how many tags I put in them. So my question is how or if it's possible to add another field like it to templates? Thanks.
  11. Peter Knight

    Hi guys Trying to output a series of image tags in surrounded by an <li> a I've been partially successful in that the tags are displaying BUT they're repeating. IE the following code ... will output Sitting-Room Kitchen Kitchen Home-Office Gym Basement Bedroom Gym Basement There's repetition in there. I only need a tag listed once. There's also a case where an image has 3 tags IE Bedroom Gym Basementis actually 3 separate tags. That's the first 2 parts of my problem
  12. Hey folks, I'm attempting to order a list of subjects based on the number of pages (not child pages) that link to each subject. The end result will look like this: portrait — 120 items landscape — 78 items trees — 42 items beards — 8 items etc. I've been digging through the archive here, but I can't seem to find a solution. The issue is that I'm using wire('page')->find to get the list of subjects, and then getting the number of linked items inside the foreach — here's my code: $subjects = wire('page')->find("template=subject, sort=title"); foreach ($subjects as $subject) { $artwork = rendersubjectArtworkList(findartworks("subjects=$subject, limit=1")); $count = findartworks("subjects=$subject")->count; } I can't figure out how to either combine my queries or re-sort the list after the call. Any ideas? Thanks so much for any help!
  13. Hi folks, I have some tags setup, using the Page field options, which is really flexible and works great. However, I am curious to know if it's possible to view multiple tags at any one time? Is this possible? For example, I know to create a tag page (for example, www.domain.com/tags/events), you do the following: <?php $tags = $pages->find('parent=/projects/, tags=' . $page . ', sort=sort'); ?> Is it possible for a query to exist so you can view multiple tags? www.domain.com/tags/events&films&outdoor Any thoughts? Good, bad? Cheers! R
  14. Tom.

    Hello, I'm created a site where it will have related case studies depending on the tags. I've got it working and it works perfectly, but I was just wondering if there was a more elegant approach using more of ProcessWires powerful API. So I have a page called Tags that are hidden, with the children being the tags themselves. On each Case Study I have a Tag field that is selectable from the Tags page. Then in my code I have: foreach($page->tags as $tag) { $a[] = $tag->title; } $a = implode("|", $q); $results = $pages->find("tags~=$a")->shuffle(); foreach($results as $result) { if($page->id != $result->id) { echo "<a href='$result->url'><h1>$result->title</h1></a>"; } } Let me know if there is a more elegant way of doing this. I'm obsessed with clean code Thanks, Tom
  15. I only stumbled across WP a few weeks ago, but have already been able to accomplish far more than over months spent banging my head against the baroque code of several shall-remain-nameless frameworks. I could weep thinking of how much time I have wasted elsewhere. I have, however, hit a speed bump--possibly due to the fact that I am still a bit shaky on how templates interact. My set-up (a sample travel site): Places Place1 see poi1 poi2 do poi3 poi4 sleep poi5 plan poi6 Place2 see poi7 do... Interests Interest1 Interest2 Interest3... "Interests” act a bit like tags assigned to the "poi"s (this is an internal tagging system, open to admin only; no free tags/users cannot assign). For the record, that odd "poi" nomenclature stands for "point of interest" (as a unique name, it's handier than using something vague like "item"). (Aside: Yes, I realize "see, do, etc." could exist instead as a third "Categories" tree. I fiddled with that, but in the end figured I'd just use the already powerful and straightforward parent/child nesting format of pages that PW provides. Also [ahem], I couldn’t get urlSegments to work; another time.) A simple foreach loop on my _main.php page creates a link-list of the Interests assigned to a given poi. <?php foreach ($page->interests as $i) { echo "<li><a href='{$i->url}'>{$i->title}</a></li>"; } ?> When you click on these generated links, it takes you to the appropriate "Interest" page, populated by all POIs assigned that Interest. Here is the relevant part of my Interest.php code: $int = $page->id; $pois = $pages->find("template=poi, interests=$int"); $content .= renderNav($pois); Problem: I do not want to see _all_ the POIs assigned that Interest. I need to limit it to other POIs in this particular Place (the grandparent of the referring POI). In other words, I only want to see other "Museums" (interest) in London, not those in Bath, Manchester, and Oxford as well. This is easy to do in absolute terms (I can limit to "has_parent=London" or something); but I need it to be some kind of $place variable instead, one assigned by the referring POI. For the life of me, I cannot figure out what code to use and where to stick it--in the foreach loop of the poi.php page? On the "Interests" template page? In short, how does this variable (the "Place" grandparent of a given POI) get assigned to the link and hence carry over to be able to be used in the functions being applied by another template (Interests)? I suspect the answer is so glaringly obvious only an interactivity noob like me would not know. That would explain why I canot seem to find the answer after a solid week of trolling every forum thread, tutorial, and wiki at PW. While I’ve built my own static HTML sites for 20 years (wow, that seems long; anyone else remember dividing text blocks with HRs, or the glorious day HTML3 finally allowed us to align GIFs so text could actually flow around them?) I am only a journeyman at PHP and MySQL. I've never even created a form. I know. Shameful. Thanks for your help.
  16. Peter Knight

    Hi guys. Just a query - nothing relevant on Google. I have about 400 blog posts which need tagging and categorising. I already have a list of about 5 known words I need tagged and applied to each post via pageselect field. IE cat, dog, fish Is it possible to somehow scan my 400 posts body field for these cat, dog, fish words, and then auto-tag them? Just a query at the moment.
  17. Peter Knight

    Short version Can we make the Page fieldtype as the tagging engine for images? Long version / real example I started using image tags for the first time after reading making efficient use of fields in PW. There's a part titled Use multi-file fields to replace several single-file fields where Ryan mentions tagging. As I was building a site for an interior designer, I needed an almost identical setup and to tag images with a gallery with "basement", "living room", "garden" and "kitchen" tags. At one stage, my client wanted "basement" changed to "basement and garden" and I had to manually edit about 15 images. No big deal really but it doesn't seem very scalable. Having used the Page fieldtype for tagging blog posts and news and experienced how easy it is to make global tag names changes etc, I wondered if the Page fieldtype could be put on the roadmap as the tagging engine for images or at least as an option.
  18. Peter Knight

    I have a list of Tags on a blog. They basically list all the tags used across all posts using the selector below. <?php echo "<ul class=\"rhs-meta\">"; $browse_tags = $pages->find("template=el-tag-individual"); foreach ($browse_tags as $tag) { echo"<li class=\"\"><a href=\"{$tag->url}\">{$tag->title}</a></li>";} echo"</ul>" ;?> I notice when a page is unpublished, tags used by a page are still included on the list of tags. PW is just doing what I ask it- pull in all tags from pages with the template el-tag-individual is there a way to exclude tags from unpublished pages? The selector documentation refers to the opposite (including unpublished pages).
  19. Hi everyone, i've build the recommended setup for processwire to work with tags, which means i have a page tree "Tags" and this page tree hold several title-only pages, each represents a tag. for the gallery items i like to tag, i've build a template with an categories field of the type "page", this template will be used by every item to hold the tags. the field is "free tagging" field, so it would create the tag-pages autmaticly. now i need to import a csv file and this is where i have a problem: when i'm using "the import pages by csv" module, i am not able to select the category field as csv target. the tags column of my csv holds comma separated words as tag, so the schema looks like this: PICTURE NAME | TAGS ---------------------------------- Some title | birds, unicorns, kittens Another title | hearts, stars, pie so i need to be able to select a page reference field as target for the TAGS column of the csv, and for every comma separated word i need to create a page tag automaticly and add this tag to the gallery item i hope it's understandable what i like to do, otherwise feel free to let me explain it again
  20. EDIT: Not sure why it didn't work the first time I tried it, but creating a tag without the space or hyphen did eventually work. I'll have to use my workaround (since I can't omit the space in the title of the page). Mods are welcome to delete this post or leave it for someone else who might run into the same thing. I thought I was doing something to make life easier on myself (this is how all tragedies begin). On a site (live, of course), I had two separate areas where product literature documents were referenced. There is a product literature section, and individual product pages. Before, in each template, I was linking to static URLs for files that were placed on the site via FTP. What usually happened was that I'd upload a file to the Literature section and forget to add it to the product page. Yesterday I decided that it would be less complicated (and more fool-proof) to use a File upload field in the Product Literature section, with tags that match the titles of the product pages, so that the product's template could pull from the same files. I thought tags would allow me the flexibility to add any tag I might need down the line. With some fits and starts, I got it working yesterday for two categories of document (I thought). Today, I tried to finish up the task and noticed that two of the products are not pulling any documents at all. My first instinct, because mysql searches have burned me before, was that the tags "Spectra 500" and "RDS-30" were falling under the search term limits. "Spectra 1000" and "Spectra 1100" work as intended. Reading up in the forums seemed to agree about the search phrase length. I went to the site and did a quick change up of the product page's title and the tags on the document to test, but changing the terms to "Spectra500" and "RDS30" didn't correct it. Later this did start behaving as expected, not sure why I had misleading results from my first attempt. So I set up and coded a workaround (thinking a multi-Page Select field on the literature page and a corresponding text field for the product pages). Final code to pull files on pages of template "document" using Page Multiselect from the template of pages of template "product": $datasheets = $pages->find("parent=/product-literature/product-data-sheets/,template=document,product_tag=$page"); $manuals = $pages->find("parent=/product-literature/product-instruction-manuals/,template=document,product_tag=$page"); if(count($datasheets)) { echo "<div class='col span_2_of_4'>"; echo "<section class='reports'>"; echo "<h4 class='section_names'>Available Product Documentation</h4>"; foreach($datasheets as $datasheet) { echo "<div>"; $datasheetLink = $datasheet->get("254_file")->url; echo "<a href='{$datasheetLink}' target='doc_window'><img src='{$config->urls->assets}images/documenticon.png' class='floatleft' alt='{$datasheet->title}'>"; echo "<p class='file_names'>{$datasheet->headline}</p></a>"; echo "</div>"; } if(count($manuals)) { foreach($manuals as $manual) { echo "<div>"; $manualLink = $manual->get("254_file")->url; echo "<a href='{$manualLink}' target='doc_window'><img src='{$config->urls->assets}images/documenticon.png' class='floatleft' alt='{$manual->headline}'>"; echo "<p class='file_names'>{$manual->headline}</p></a>"; echo "</div>"; } } echo "<br /> <br /></section>"; echo "</div>"; } else if(count($manuals)) { echo "<div class='col span_2_of_4'>"; echo "<section class='reports'>"; echo "<h4 class='section_names'>Available Product Documentation</h4>"; foreach($manuals as $manual) { echo "<div>"; $manualLink = $manual->get("254_file")->url; echo "<a href='{$manualLink} target='doc_window'><img src='{$config->urls->assets}images/documenticon.png' class='floatleft' alt='{$manual->headline}'>"; echo "<p class='file_names'>{$manual->headline}</p></a>"; echo "</div>"; } echo "<br /> <br /></section>"; echo "</div>"; }
  21. quickjeff

    Hi Guys, So I am working on a project and wanted to get the best advice using the api on the next step. I have two image fields in one template. postimage which holds an image for the article and postimage2 which holds an image for the home page. Basically I want to make it so that when a user uploads postimage and not postimage2 the home page will just pickup postimage instead. If the user does upload postimage2, it should pick up postimage2. What I did: I did add a conditional statement to check if postimage2 was empty to simply default to postimage but I was not seeing any images display. Here is my code: <?php foreach($featured as $featuredp){ foreach($featuredp->postimage2 as $postimages2) { echo"<div class=\"row panel\" style=\"margin:20px auto;\">"; echo"<div class=\"large-4 columns\"><p> <a href='{$featuredp->url}'><img src='{$postimages2->url}' width=\"300\"/></a></p></div>"; echo"<div class=\"large-8 columns\"> <h4>{$featuredp->title}</h4> <p><em>{$featuredp->date}</em></p> <p>{$featuredp->summary}</p> <p><a href=\"{$featuredp->url}\" class=\"button tiny radius\">Read More</a></p> </div> </div>"; $found = 1; } } if ( ! $found ) { echo"<p>Sorry, no posts.</p>"; } ?> Any advice is appreciated? Also any suggestions or workarounds are also welcome!
  22. If I am implementing a 'free tagging field', which is explained by @ryan here > https://processwire.com/talk/topic/71-categorizingtagging-content/ is there any way to do this for more than one word (for example if a tag I entered is 'green energy') So, I have a tag.php template which uses something like: <?php if ( $tag = $sanitizer->selectorValue($input->urlSegment1) ) : ?> <?php $matches = $pages->find("tags*=$tag"); ?> <?php foreach ($matches as $match) : ?> <?php endforeach; ?> <?php endif; ?> This allows me, using url segments, to do: /tags/green and the results with a tag 'green', would come up. But how would I do it for something like 'green energy', so /tags/green+energy or /tags/green-energy... Currently my free tagging field is just a text field, but I could make this into a repeater, for example, if it helps this situation. Thanks in advance
  23. Hello All! This is my first post here and am a newbie with PW. So far I've been able to accomplish everything I've wanted to do dynamically in my first PW site, but ran into a big snag yesterday. Ok here's the setup: I have on my site 4 pages that deal with separate plumbing services. We offer a discount coupon for each service. For each service, I am displaying it's coupon image in the sidebar. Each coupon image resides in the images field of the individual rootParent parent services page, and each image has a tag of "coupon" assigned to it. So for example, I have a rootParent level "Drain Cleaning" page and it is in this page's images field that the Drain Cleaning coupon image resides with the tag "coupon." The next coupon resides in the images field for my rootParent "Sewer Cleaning" page, and so on. For each service page, I have some Hanna Code I wrote to include the coupon image in the sidebar of the rootParent and all of it's children: $coupon = $page->rootParent->images->getTag('coupon'); This works great! Now, here's my problem... For pages other than the service pages, like form confirmation pages, the Contact Us page, etc., I still want to display a coupon image in the sidebar, but I want to grab a random coupon image and display it. So far, I have not found a way to successfully scan all page's images field, grab the images with the tag of coupon, then display a random image. Here is the code I've come up with so far that is not working: First, build the array of pages containing an image with the tag of coupon (this works): $couponpages = $pages->find("images.tags=coupon"); Next, get the images tagged coupon from the array of pages containing them (this is where the code breaks and throws an error): $coupons = $couponpages->images->getTag("coupon"); The error reads: "Fatal error: Call to a member function getTag() on a non-object." Beyond that, I would then want to fetch a random image and display it: $coupon = $coupons->getRandom(); echo "<img alt='{$coupon->description}' src='{$coupon->url}' />"; If anyone can help me solve this it would be most appreciated! Thanks, Dave
  24. hello to everyone, i'm salles first please forgive my grammar as english is not my native language although i've been "watching" processwire for a while, this is the first time i'm considering processwire for a project. pw seems to be somewhat easy for non developers like me, it actually reminds me a bit of kirby cms. until we deal with common blog features... for example: how do we deal with categories and tags groups (each group for different sections of the site). and how to set up them? i know there's a blog profile, but honestly i think it's a bit too tricky to create php functions just to create simple things like categories and tags. especially for non php coders. i think common blog features should be built in the core like most cms's. cheers, salles