Would be easier if only 1 category would allow direction submission. Also look into hiding the category sidebar block.
Open acp > theme editor > collections > front > browse > index.
Find:
<a class="ipsButton ipsButton_medium ipsButton_important ipsButton_fullWidth" href="{url="app=collections&module=collections&controller=submit&_new=1" seoTemplate="collections_add"}" data-ipsDialog data-ipsDialog-title='{lang="add_item" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'collections__item' )"}' data-ipsDialog-size='narrow'>{lang="add_item" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'collections__item' )"}</a>
Replace With:
{{if $theOnlyNode = \IPS\collections\Category::theOnlyNode()}} <a class="ipsButton ipsButton_medium ipsButton_important ipsButton_fullWidth" href="{url="app=collections&module=collections&controller=submit&do=submit&category={$theOnlyNode->_id}" seoTemplate="collections_add"}">{lang="add_item" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'collections__item' )"}</a> {{else}} <a class="ipsButton ipsButton_medium ipsButton_important ipsButton_fullWidth" href="{url="app=collections&module=collections&controller=submit&_new=1" seoTemplate="collections_add"}" data-ipsDialog data-ipsDialog-title='{lang="add_item" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'collections__item' )"}' data-ipsDialog-size='narrow'>{lang="add_item" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'collections__item' )"}</a> {{endif}}
Save.
Recommended Comments
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.