Id like to align the last 4 items on the category navigation bar to the right, meanwhile the others stay at the left. Editing the CSS affects all the <li> elements hence it won't move only the last item to the right but all of them. I think I have to add CSS classes to categories in the header.tpl. I used the below VQmod.xml file to add classes to category items but I fail to synchronize it with CSS(most likely due lack of knowledge).
There's a similar thread on the forum, but the difference is that the author on the other thread was looking for moving only the last item but I need to move 3-4 items. Also their code messes up the dropdown-menu which makes it pretty unusable.
http://forum.opencart.com/viewtopic.php?t=129177
A visual preview of what I'm trying to archive.
http://i.imgur.com/4TzRkt2.png
Code: Select all
<modification>
<id><![CDATA[Adds CSS classes to categories in header.]]></id>
<version><![CDATA[1.0.0]]></version>
<vqmver><![CDATA[2.4.1]]></vqmver>
<author><![CDATA[CreadevDotOrg]]></author>
<file name="catalog/controller/common/header.php">
<operation error="log">
<search position="after"><![CDATA[
'name' => $child['name'] . ($this->config->get('config_product_count') ? ' (' . $product_total . ')' : ''),
]]></search>
<add><![CDATA[
'child_id' => $child['category_id'],
]]></add>
</operation>
<operation error="log">
<search position="after"><![CDATA[
'name' => $category['name'],
]]></search>
<add><![CDATA[
'category_id' => $category['category_id'],
]]></add>
</operation>
</file>
<file name="catalog/view/theme/*/template/common/header.tpl">
<operation error="log">
<search position="replace"><![CDATA[
<li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
]]></search>
<add><![CDATA[
<li class="cat-<?php echo $category['category_id']; ?>"><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
]]></add>
</operation>
<operation error="log">
<search position="replace"><![CDATA[
<li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
]]></search>
<add><![CDATA[
<li class="cat-<?php echo $category['children'][$i]['child_id']; ?>"><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
]]></add>
</operation>
</file>
</modification>

Warm regards,
Thallium