Quote:
Originally Posted by roymogg
Andrew,
I was thinking about doing something similar and added some attributes (contact name email etc.) and wanted to show these in the featured template (or similar shorter catlink template). The extra attributes do not show up - OK in the larger templates.
Have I done something wrong (the answer is probably yes but would like to know how to correct)
can you advise
cheers
Roy
Is it possible to add another catlink template?
|
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.