Drop-down tag list?

Jan 20, 2006 16:41

I've been trying to incorporate xtomxfallsx's drop-down tags list tutorial for Component into my layout myself to no avail. I haven't see this tutorial in this community either, so I was wondering if anyone knows how to make a drop-down list for tags in the sidebar. Help please?

PS: my layout is customized based on dooped's code & I'm using the updated version of ( Read more... )

sidebar, tags

Leave a comment

Comments 7

xtomxfallsx January 21 2006, 01:16:22 UTC
Can you link me to either your layer or the version of Flexisquares that you are using? I just want to make sure that the sidebar items are printed the same was as they are in the standard layout.

Reply

xtomxfallsx January 21 2006, 02:54:26 UTC
Alright, put this somewhere in your theme layer before print_sidebar()
function print_sidebar_tags() {
var string tagdd_header = "Tags In This Journal"; # set the component header text, you can change this to whatever you want
var string tagdd_button = "Go"; # button text, change it to whatever you want
var bool tagdd_blank = true; # set to true to create a blank option at top the list, or false not to
# No need to change anything below this line (unless you know what you are doing!)

var Page p = get_page();
var string tagdd_base_url = $p.journal->base_url();
var string tagdd_content = "";
var string tagdd_options = "";
var TagDetail[] tagdd_tags = $p->visible_tag_list();

foreach var TagDetail tagdd_tag ($tagdd_tags) {
$tagdd_options = $tagdd_options + """$tagdd_tag.name\n""";
}
$tagdd_content = $tagdd_content + """
""";

print_sidebar_box($tagdd_header, $tagdd_content, "");

}Then, inside print_sidebar(), toward the end where you ( ... )

Reply

kindlin January 21 2006, 04:53:39 UTC
That worked fabulously! Thank you. You're awesome. :)

Reply


my_gravity November 29 2007, 17:25:37 UTC
Hi. I'm trying to add tags to my sidebar too and wanted that drag and drog tags list but I have a basic free account is that why I can't do anything with it? Because I am having trouble just trying to have my tags list in the sidebar in the first place!

Reply


taru_croft October 3 2009, 08:06:27 UTC
Thanks for this tutorial!

Reply


Leave a comment

Up