I am trying to make changes to the header top links on my magento 2.1.8 store.

I have created a custom module called Batch Order which should only be accessible to customers from certain groups.

The groups can be changed in an Admin page, and so to make the link only appear for the correct customer group i need to create an if statement in my links.phtml file.

The groups that should see the link are stored in a database so i need a block to:

  1. get the list of allowed groups from the database

  2. get the current sessions customer group

  3. check if the current customer group is allowed to see the link

however i cannot find the correct block to put the code in.

In the links.phtml file, the block is accessed using a method $block->getIdModifier() but when i search the entire Magento solution for getIdModifier the only results being return are other files using this method and not the actual method definition.

How would i go about adding a block to the links.phtml file or where will i find the existing block so i can just add my code?



Template being used:

http/app/design/frontend/Venustheme/cricket/Ves_Themesettings/templates/html/links.phtml It is overriding the original file: http/app/code/Ves/Themesettings/view/frontend/templates/html/links.phtml

  • can you tell the location of links.phtml file ? – Sunil Verma Feb 21 '18 at 10:18
  • the one that is currently being used is http/app/design/frontend/Venustheme/cricket/Ves_Themesettings/templates/html/links.phtml it is overriding the original file: http/app/code/Ves/Themesettings/view/frontend/templates/html/links.phtml – dev Feb 21 '18 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.