Jump to content
thirty bees forum
  • 0

Make Site Map Page the Home Page on Niara


Question

Posted

Can anyone point me in the right direction?  I am looking to make the sitemap page for this theme the home page (looking for an outline format, craigslist-ish home page.  Perhaps simply swapping out the code between the home template and sitemap template may work. Doesn't look like this can be done through the GUI, so I'll be digging into the theme files..

2 answers to this question

Recommended Posts

  • 0
Posted

You can't just copy anything from one template to another and expect it will work -- templates need data that are provided by associated front controllers. Sitemap controller prepares data for sitemap template, and index controller prepares different set of data for homepage template. There's no way to mix and match this...

The easier way to achieve what you want is to implement your own module, hook it to `displayHome` hook, and display any data you want (in your case copy code from sitemap controller, and copy sitemap template, and wire it all together)

  • Like 1
  • 0
Posted
4 hours ago, lelabrady said:

yeah, right!

There's no need to be sassy. Unfortunately, this is how customization works.

In templates, you can do small changes, mostly related to design. But it's not possible to display new data, simply because template doesn't have them. There must be some piece of code that extracts this data from database or other source, pre-process them to appropriate format, and pass them to template. This is controller's job.

So, if the customization request asks for new set of data to be displayed, then controller needs to be involved. You can either edit core controllers (which is a big no-no). Or you can create a new controller inside a new module, and use hooks to display content where you need it.

I understand that regular merchant can't do this. It's very technical. That's why professional developers exists.   

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...