Quote:
Originally Posted by |oR|Greg
I do have a question though Andrew. I want to start making my own templates to use like the links_linkbit_table, ya know, something that I can select that is my own formatting, but I don't want to overwrite your templates.
I went into Styles & Templates, added a new template with the code I want to use, but it doesn't add it to your Links and Downloads of course, just to the Custom Templates section. How do I use that new template in LDM?
|
You're wanting to have additional templates, rather than just a different style? Easiest approach would be to create a new style and simply customise one of the linkbit templates in that style, and tell LDM to use the new style for those categories of interest (on the edit category/display settings tab)
If you really want to add additional templates, then this is a straightforward edit to the code. Go into local_links_include.php, and about 250 lines in, you'll find an array declaration as follows:
PHP Code:
$linkbitcache = array(
"links_linkbit_short" => array("collapse"=>0, "defcol"=>1, "maxcol"=>3, "altbit"=>"links_linkbit"),
"links_linkbit" => array("collapse"=>"links_linkbit_short", "defcol"=>1, "maxcol"=>1, "altbit"=>"links_linkbit"),
"links_linkbit_table" => array("collapse"=>"links_linkbit_short", "defcol"=>1, "maxcol"=>2, "altbit"=>"links_linkbit_table"),
"links_linkbit_photo" => array("collapse"=>0, "defcol"=>$maxpic, "maxcol"=>$maxpic, "altbit"=>"links_linkbit"),
);
Just add your new template to the end of the array, and it will magically appear on the list of choices.
For example:
PHP Code:
"mylinks_linkbit_new" => array("collapse"=>"links_linkbit_short", "defcol"=>1, "maxcol"=>1, "altbit"=>"links_linkbit"),
There are a few lines of comment just above the array, explaining the parameters.