
06-30-2008, 07:47 PM
|
|
|
Join Date: Jun 2007
Location: UK
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by AndrewD
The attributes are patched into the linkbits part way through processing. For them to appear, the following line has to appear somewhere in the relevant linkbit template. (Currently, the featured linkbit does not have this line)
Code:
<!--$linkid::entities-->
The entities themselves are built up using the links_viewone_entity template and then inserted at the marked point in the template.
Currently, new linkbit and catbit templates are added programmatically. Take a look at includes/local_links_admininclude.php. At around line 626, there's a sequence:
Code:
// Pre-defined catbits - extend to match catbits available in templates.xml -----------------------------------------
// name=X: name used in selection menus
// defcol=N: default number of display columns
// maxcol=N: maximum number of columns that it makes sense to display
// subbit=M: template used for displaying subcategories within this catbit
require_LDMadminrow($seq++, 'links_catbit', serialize(array("name"=>"Tabular", "defcol"=>1, "maxcol"=>4, "subbit"=>"links_subcatbit")), 'define_catbit', 1);
require_LDMadminrow($seq++, 'links_catbit_brief', serialize(array("name"=>"Brief", "defcol"=>2, "maxcol"=>4, "subbit"=>"links_subcatbit")), 'define_catbit', 1);
// Pre-defined catbits - extend to match catbits available in templates.xml -----------------------------------------
To add a new catbit, add another line of code:
Code:
require_LDMadminrow($seq++, 'links_your_catbit', serialize(array("name"=>"YourCatName", "defcol"=>1, "maxcol"=>4, "subbit"=>"links_subcatbit")), 'define_catbit', 1);
Save, upload, and re-install the LDM product loader. The new catbit will appear on the selection menus.
|
Many thanks Andrew this looks very straightforward - if I have a prob will get back.
This is really a great add-on and I have already had some good feedback.
Cheers
Roy
|