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... )
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 determine the sidebar order, put in print_sidebar_tags(); wherever you want it to show in the sidebar.
Then just make sure you've got set show_tags = true; in your user layer. This will only work with the new version of Flexisquares, not the original.
You can use CSS in print_custom_head() to style the dropdown (#tagsdd_select) and the button (#tagsdd_input).
Reply
Reply
(The comment has been removed)
Reply
Leave a comment