Custom Text Specific to Tag on Search Tags Page

Hi there,

I am generating dynamic pages from PrintAllTagsAs('list'..) and they work well, however, my client wants to add a description onto 3 of the 7 pages. Is there some way to associate a Custom Data field with a set of tags? I was able to use Custom Data with my Album template, but I am now using a Search template and don't know where to put my text or how to access it from the search scope. I would really like to avoid hard-coding the three descriptions so my client can update them herself.

You can view the test site to see everything in action (the URL will change after I go live): http://sirijewelry.com/zenphoto/

The three collections are in the "Search by" list of tags as well as linked from the Collections page. I made these both link to the dynamic search pages to eliminate redundancy in the site architecture, but I lost the Custom Data functionality when I did away with the Album template.

Any suggestions?

Thank you!

Comments

  • I actually need something similar on the Contact Form plugin/template page -- is there a way to include, say, a code snippet from somewhere in the admin area?
  • You've got the collections setup as dynamic albums right? If so, why not just have the client add the album description via the backend and then all you have to do for those specific pages is call the album description. You can see an example I did here.

    First I did the search for Ocean Shores, then created the album, once created added the description. The theme I'm using currently already has the call to display the album description.

    Example here.
  • Edit: removed doublepost
  • I'm not using dynamic albums, but rather Search Tags pages (which are generated dynamically). I did it this way because my client wants a list that includes more than just the collections: all the tags, essentially. I do not want to hard code the list, so I'm using PrintAllTagsAs('list'). I just want to inject dynamic content into the pages linked from the tag list. Does that make sense?
  • You can create "theme options" for the theme. Kind of brute force, but it would work. Create an option for each of the pages and store the text there. You can use `setOptionDefault()` to insert some default text. Then later on your client can go to the theme options page and make changes.

    Unfortunately this does not make it easy to add such fileds. You could go a bit further and create an option that works something like the codeblocks of zenpage. You would have to use the custom option handling methods provided as you would want to store a serialaize array of text strings. Or you could make it simpler and just have a "convention" for how he enters the text. Forinstance you could use something like {tag keys}=>text string {tag keys}=>text string. Then you would just have to parse that string to see if there is a text entry for a particular set of tags.
Sign In or Register to comment.