Search the Community
Showing results for tags 'tagging'.
-
Hey, I'm new and I created a simple module for tagging pages because I didn't found a module for it (sadly this is not a core feature). This module is licensed under the GPL3 and cames with absolutly no warranty at all. You should test the module before using it in production environments. Currently it's an alpha release. if you like the module or have ideas for improvements feel free to post a comment. Currently this fieldtype is only compatible with the Inputfield I've created to because I haven't found an Inputfield yet, that returns arrays from a single html input. Greetings Sebi2020 FieldtypeTags.zip.asc InputfieldTagify.zip InputfieldTagify.zip.asc FieldtypeTags.zip
- 14 replies
-
- 5
-
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!
-
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.
-
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>"; }
-
I decided to rebuild an old image gallery site with PW. I know there's countless image-gallery scripts out there, but for my liking, most of them are too bloated. Also, I thought this was another good opportunity to dive further into PW-world. I'm keeping the old basic gallery structure: 95% of the galleries are in date-folders (monthly), like a blog archive. But I'd like to add some filter / search functionality, because there's just so many pics - when you come to the site and look for a specific subject, there was no way to do that on the old site. Q 1: How can I create a simple "search by image tag"? I want the results to list all images (thumbs) with tag x, and a link to the parent page. Q2: How would I most efficiently grab all tags from all pages, all images, and present it alphabetically (not necessary a fancy tag-cloud, but making sure I list each unique tag only once)? So when the user clicks on one tag link, he sees all image thumbs that have that tag on the results page. $p = $pages->find("images.tags~=$tag") works fine. I can explode("|", $p) to get a page-id array, but where would I go from here? A tag can be any anywhere, in various galleries (pages), and most pics have multiple tags. I'd like to group the results by page, so I guess I need to add 1-2 foreach loops, no? Can somebody help with some example code? I'm a bit stuck right now.
-
I am trying to implement a KISS (Keep It Simple Stupid) tagging system, one depth, i.e tags not hierarchical categories. Each page would display any tag that was added to it as a link; the link goes to a page where all other pages sharing that tag are listed, quite basic. In my attempts to do this I have been reading up, posting, getting help (thank you patient helpers), trying, failing and have slightly run aground. I know instinctively from the little I've done with PW that this is going to be easy, when I can see 'how'. These are the three threads I've been looking at, but perhaps each was not quite what I am trying to do and that, plus my PHP weakness, stopped me succeeding. These are my assumptions as to what I would do: have an AsmSelect field called "tags" on each page in the Admin so content authors may select or add tags per page have a page below Home called "tags" which will have a child page per tag don't have a .php file for the "tags" page (is that right?) don't have a .php file for each children page of the "tags" page use a file-less template for the "tags" page and children pages and that template to include only the title field (is that right?) use my main/single .php template file for all pages and detect if it is being used to display tag-related content and change its outs put accordingly. If you're able to point me to a thread I may have missed containing code samples so someone like me can get going, or post a few snippets to show me the basic code and correct any of my assumptions that look wrong I would be very grateful. Cheers, -Alan