<![CDATA[ Dynamically generated list of documents that are tagged with categories? - My Forums]]> https://forums.modx.com/thread/?thread=11108 <![CDATA[Re: Dynamically generated list of documents that are tagged with categories?]]> https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories?page=2#dis-post-513380
http://modx.com/extras/package/taxonomies]]>
absent42 Oct 24, 2014, 01:25 PM https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories?page=2#dis-post-513380
<![CDATA[Re: Dynamically generated list of documents that are tagged with categories?]]> https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories?page=2#dis-post-513339
http://www.djcdesign.co.uk/tag-results.htm?tag=tearsheet

Add to the title of the page, the 'tag' that is displaying.

This is my call

[[!getResourcesTag? &parents=`2` &tagKey=`documentTags` &includeTVs=`1` &limit=`16` &tpl=`result_tpl`]]


But I can't get the above little snippet to work - where do I add my &tagKey huh?

Sorry probably being a bit slow !]]>
DavidJColbran Oct 24, 2014, 03:55 AM https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories?page=2#dis-post-513339
<![CDATA[Re: Dynamically generated list of documents that are tagged with categories?]]> https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories?page=2#dis-post-397237
harless Reply #2, 13 min ago

Un-mark As SolutionReply
You could create a very simple snippet that would simply output the tag value when the key/value pair for tags is present in the query string.

Vary basic snippet (ex snippet name: dyntagtitle):
//-- Get all request string key/value pairs
$s = $_REQUEST;
 
 
 
if($s['key'] == 'tags'){
  return $s['tag'];
} else {
 return false;
}


Then on the page template simply put the snippet call where you want it to be displayed:

[[!dyntagtitle]]



cheers]]>
rrswans Oct 18, 2011, 12:27 PM https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories?page=2#dis-post-397237
<![CDATA[Re: Dynamically generated list of documents that are tagged with categories?]]> https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories?page=2#dis-post-397028 rrswans Oct 16, 2011, 03:30 PM https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories?page=2#dis-post-397028 <![CDATA[Re: Dynamically generated list of documents that are tagged with categories?]]> https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories#dis-post-397027
Try this:

<a href="[[~[[+id]]? category=`[[+key]]` ]] ">


If you need more than one, do it like this:

<a href="[[~[[+id]]? &category=`[[+key]]` &other=`[[+something]]` ]] ">


First, though I would try to check whether the "key" placeholder is set at all.


]]>
BobRay Oct 16, 2011, 03:19 PM https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories#dis-post-397027
<![CDATA[Re: Dynamically generated list of documents that are tagged with categories?]]> https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories#dis-post-397025
Here is my template chunk that I am using though out my blog

<a href="[[~[[+id]]]]? category=[[+key]]"><div class="postWrap">
<div class="post">
<span class="date">[[+publishedon:strtotime:date=`%b %d, %Y`]]</span>
<span id="smallThumb">[[+blogThumb:phpthumbof=`w=132px`]]</span>

    <span class="title">[[+pagetitle]]</span>

<a href="[[~[[+id]]]]" class="readmore">Read more </a><img class="arrow" src="/assets/r_templates/images/readMorearrow.jpg" />
</div>
</div></a>


this is the template file that controls the resource that taglister points to:
[[$head]]

<body id="subLevel">
           	[[*backgroundImage]]
	<div id="pageWrapper">
		[[$newMenu]]
	<div id="contentWrapper">
	<div id="mainSection" style="background-image:url('[[*orangeObject]]');">
	  <a href="[[$siteName]][[UltimateParent]]"><h1>[[getResourceField? &id=`[[UltimateParent]]` &field=`pagetitle` ]]</h1></a>
	<div id="leftNavigation">[[$blogMainMenu]]




        </div>
	<div id="rightSideBlog">
	  <h2>This is where I want the title to go

</h2>

                <div id="mainContent">
                    [[*content]]
        </div>
	</div>
	</div>
	  [[$r.footer]]
	</div>
	</div>

	</body>
</html>


this is the resource content area of the page that taglister points to
[[!getResourcesTag? &parents=`71,72,73` $tagKey=`tag` &tagRequestParam=`tag`]]

[[!getResourcesTag? &elementClass=`modSnippet` &element=`getResources` &tpl=`blogPost` &parents=`71,72,73` &limit=`36` &includeContent=`0` &includeTVs=`32` &processTVs=`32` &tvPrefix=`` &showHidden=`0` &hideContainers=`1` &cache=`0` &pageVarKey=`page` ]]

 

<h3>[[!showCategory]]</h3> 

[[!+page.nav:notempty=`

[[!+page.nav]]
`]]



and this is an example of the url I am current getting when clicking on the tags

http://newer.pointbdev.com/tag-and-archive-page/?tag=things&key=tags

again I want the tag clicked (in this case "things") to be dynamically inserted onto the resource page. So that when a user clicks on a tag and sees a list of all posts that have that tag, they also see a heading that shows them which tag was clicked. hope that makes sense.]]>
rrswans Oct 16, 2011, 02:30 PM https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories#dis-post-397025
<![CDATA[Re: Dynamically generated list of documents that are tagged with categories?]]> https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories#dis-post-396828
<a href=[[~[[+id]]]]? category=[[+key]]> 


Then on the target page, a simple snippet could pull that term for you:

<h3>[[!ShowCategory]]</h3>


<?php
/* ShowCategory Snippet */
return $_GET['category'];
]]>
BobRay Oct 13, 2011, 11:50 PM https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories#dis-post-396828
<![CDATA[Re: Dynamically generated list of documents that are tagged with categories?]]> https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories#dis-post-396811
I have my blog fully functional with taglister and to links directing links to a target resource. Lets say the user clicks on a tag called "dogs". The query works properly and the user is takes to the target resource with all the blog entries that have a tag of "dogs" However, I want it to say "dogs" at the top of the page as a heading. This is pretty standard in wordpress and I can't find anything on it here. There must be a way to do this. Do you have any ideas?]]>
rrswans Oct 13, 2011, 07:51 PM https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories#dis-post-396811
<![CDATA[Re: Dynamically generated list of documents that are tagged with categories?]]> https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories#dis-post-396690 http://rtfm.modx.com/display/ADDON/tagLister.]]> BobRay Oct 12, 2011, 10:05 PM https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories#dis-post-396690 <![CDATA[Re: Dynamically generated list of documents that are tagged with categories?]]> https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories#dis-post-396680 rrswans Oct 12, 2011, 07:59 PM https://forums.modx.com/thread/11108/dynamically-generated-list-of-documents-that-are-tagged-with-categories#dis-post-396680