How to tag an asset and list based on tag


(Figo2477) #1

Hi,

  • Wonder how can I tag an asset with pre-defined tags.
  • Also how to list assets based on tags.

(Charlotte Westney) #2

[quote]
Hi,


  • Wonder how can I tag an asset with pre-defined tags.
  • Also how to list assets based on tags.

    [/quote]



    Hi Kenpeter,



    I've got a couple of sites that do something simliar to this, but use a search page rather than an asset list.


  1. Set up a metadata schema, and then metadata field for your various tags - I've got one that uses a bunch of checkboxes and others that use dropdowns, depends if a page can have multiple tags. Apply this schema to your pages and tag them up.


  2. Then set up a search page, with a search field that points to that metadata field.
  3. Then set your search page to look for a variable to use as the query in that search field, and set it to show the results page (rather than the search form).
  4. Then nest in your search page to a normal page, and on the nested content div, pass it a variable with the name you set up in step 3, and the value of whatever tags you want to match against.



    Here's an example, this is the search page, nested in, and being passed a variable called 'category' with a value of 'environment' - so it brings back the 5 most recently published pages with the category metadata ticked for 'environment'.

    http://www.exmoor-nationalpark.gov.uk/environment



    Then here's the same search page, nested in, being passed a variable called 'category' but with a value of 'visiting', so it brings back pages with 'visiting' checked. Our metadata means a page could be tagged for 2 or more categories, but yours could be just one.

    http://www.exmoor-nationalpark.gov.uk/visiting





    There might be other ways to do it, but this works pretty well for us, the authors just 'tag' the pages as they are filling out the metadata, and the web editor can nest in one seach page but get it to show whichever tag(s) they want on that page. We also did a test where you can set the variable value - eg 'environement', based on a keyword on whichever page its on, %asset_metadata_categrory%, so then the search list would show pages that are tagged the same as that page - related pages basically.



    Hope that all makes sense!

    Charlie.

(Ryan Archer) #3

1. Set up a metadata schema, and then metadata field for your various tags - I've got one that uses a bunch of checkboxes and others that use dropdowns, depends if a page can have multiple tags. Apply this schema to your pages and tag them up.
2. Then set up a search page, with a search field that points to that metadata field.
3. Then set your search page to look for a variable to use as the query in that search field, and set it to show the results page (rather than the search form).
4. Then nest in your search page to a normal page, and on the nested content div, pass it a variable with the name you set up in step 3, and the value of whatever tags you want to match against.
 

 

Ok, I just tried to set this one up myself but I have trouble following these directions

 

1) Setting up the metadata schema and applying metadata to the pages was very straightforward, no issues here

2) I created a search page and set up a Search Field to use the type "Asset Metadata Field" and have pointed it towards my metadata field (used for keywords)

3) I have gone to the bottom of the "Details" screen and there are several places to setup GET variables (within 'Dynamic Parameters' and 'Stored Search'). Not really sure where to set the variable up here. Have set it up to show the results page though.

4) Have nested the search page into a standard page and have put in the variables created in the previous step using keyword replacement to get the metadata field, i.e %globals_asset_metadata_<metadata name>_key% (not even sure if I'm doing the right thing here).

 

I'm not getting anything, I just have a no results page being returned. I will provide a video to illustrate this in more detail as I find lack of visual explanation frustrating in itself...

 

https://vimeo.com/126575217

 

EDIT: Man I have no idea how audio advertisements and other crud got into that Vimeo recording. I think the browser was running on something else in a YouTube channel or something...


(Nick Papadatos) #4

You may want to check the "Search Statuses" you may have only selected Live and if your pages are under construction they will not display


(Ryan Archer) #5

Thanks Nick, that did the trick!


(Nic Hubbard) #6

Unless you really need to only list a certain Status it is always best to just leave that section blank. That way listings will show assets based on permissions and it will be much faster as the extra status check will not happen.


(Ryan Archer) #7

@Nic,

 

I had nothing selected originally and nothing showed at all. Public user permissions were granted by default to all of the pages - so I am not sure what went on there...


(Nic Hubbard) #8

@Nic,

 

I had nothing selected originally and nothing showed at all. Public user permissions were granted by default to all of the pages - so I am not sure what went on there...

 

There is always something. Root node, permissions, status, something. Every time I have ever had this issue it was user error, not a Matrix error.


(Ryan Archer) #9

Ok neil-patrick.gif (998 KB)