title: Joomla : How can we assign a different layouts to different menu IDs?
body: <p>I am running Joomla and seeking you help for the following issue.</p>
  
  <p>Lets say I have 3 layouts in my template and the layout files are named as...</p>
  
  <pre><code>index.php
  index2.php
  index3.php
  </code></pre>
  
  <p>I have 5 menu links say....</p>
  
  <pre><code>Link 1
  Link 2
  Link 3
  Link 4
  Link 5
  </code></pre>
  
  <p>What I am looking for is......</p>
  
  <p>For <code>Link 1, Link 4 and Link 5</code>, I want Joomla to load the regular <code>index.php</code> but for <code>Link 2</code> I want Joomla to load <code>index2.php</code> and similarly for <code>Link 3</code> I want it to load <code>index3.php</code>.</p>
  
  <p>What I mean is... How can we assign a different layouts to different menu IDs?</p>
  
  <p>I know there is an inbuilt option to choose a different Template based on menu ID but I do not want to duplicate the template files just for this one function. Everything in my templates is the same just the change is in the layout depending on the Menu ID.</p>
  
  <p>Kindly Help.</p>