sailing123 Posted March 21, 2017 Share Posted March 21, 2017 Working on my footer now, in the templates/box.documents.php, I noticed the following coding but I cannot see what it relates to. What are these "list item" and what's their purpose ? {foreach from=$DOCUMENTS_LIST_HOOKS item=list_item} <li><a href="{$list_item.href}" title="{$list_item.title}">{$list_item.title}</a></li> {/foreach} Thanks S. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 21, 2017 Share Posted March 21, 2017 Maybe this will help: https://github.com/cubecart/v6/issues/1015 I searched in the Search Box in the black bar at the top of the v6 GitHub for " {foreach from=$DOCUMENTS_LIST_HOOKS item=list_item} " and then went to the Issue it referred to. Quote Link to comment Share on other sites More sharing options...
sailing123 Posted March 21, 2017 Author Share Posted March 21, 2017 Thanks Dirty Butter, I am no expert but sounds like hooks for plugins to call upon ? I think I will just ignore it for the time being. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 21, 2017 Share Posted March 21, 2017 That's what I got from it... with very little understanding. The fact that SemperFi asked for it makes it very likely that it's for a plugin. You will see Noodlyman and Havenswift doing the same thing in GitHub. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 21, 2017 Share Posted March 21, 2017 What you see in the skin code is so that, after plugins use hooks in the /classes/ code to add their results, there is now the means of displaying this additional data if any exists. The hooks and plugins do not assign any data directly into $DOCUMENTS_LIST_HOOKS (technically, they can, but that's bad programming), but rather indirectly through the hook that listens for plugin code. There is nothing bad that will happen if your skin has that code and $DOCUMENTS_LIST_HOOKS is empty. But if not empty, and the code isn't there, you will be missing out on what the plugin is providing. 1 Quote Link to comment Share on other sites More sharing options...
sailing123 Posted March 22, 2017 Author Share Posted March 22, 2017 Thanks for this clarification. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.