Forums / Developer / The right way to build a nav?

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

The right way to build a nav?

Author Message

Peter Bailey

Monday 31 March 2003 12:58:25 pm

Hey all

I've discovered recently that I can get quite a bit done just using the template operators and functions, but can't help but feel like I'm giving too much power to the templates.

First, some data. Here's an example folder

My Folder
>> Articles
>> >> Customer Success Stories
>> >> Technical Solutions
>> >> Editorials

From this, I would like to create the following

<ul>
<li><a href="/content/view/sitemap/243/">Customer Success Stories</a></li>
<li><a href="/content/view/sitemap/244/">Technical Solutions</a></li>
<li><a href="/content/view/sitemap/245/">Editorials</a></li>
</ul>

Also, the sitemap view isn't what I really want, but

Now, I'm assuming it would be better to add some PHP to index.php to build an object of data that I access in the template instead. I admit, opening index.php I feel a bit lost.

Am I in the correct line of thinking?

Kai Duebbert

Monday 31 March 2003 5:49:21 pm

My experience:
I've built 5 sites with Exponential 2.2.x and to do what you want to do, I *had* to dive into the PHP code of Exponential. I can assure you that you don't want to do that!

It's not that the code is bad (it's written very cleanly unlike most other open source CMS), BUT you will run into big problems, if you want to update the system to a new version of Exponential which you will want to do in the future. You will have to track down all the changes you did and do/adapt them again.

Even though this problem can be circumvented, you will have much better (and more portable!) results by using the templates (which should stay compatible with new releases).

The new template system is great and gives you a lot of power. Use it!

Just my 2 cents.