theme /template/modifications

Theme /template/modifications, a forum discussion on Jojo CMS. Join us for more discussions on Theme /template/modifications on our Themes Support forum.

Back to Forum Index : Back to Themes Support   RSS
rockstar rockstar

22 Jul 2007
Posts: 27

While the default template is nice it is meant to be changed asap/ Looking at the [view]source code for the top menu it gose like this

<!-- menu -->
<div id="menu">
<ul>
<li id="current"><a href="http://www.therockpile.org/jojo"
title="Home">Home</a></li>
<li ><a href="sitemap/"
title="A simple listing of all pages on this website">Sitemap</a></li>
<li ><a href="contact/"
title="Contact">Contact</a></li>
<li ><a href="articles/"
title="Articles">Articles</a></li>
</ul>
</div>


Looking at the code after it has been put into jojo language it is like this

<!-- menu -->
<div id="menu">
<ul>
{foreach from=$nav item=n}
<li {if $n.pageid== $pageid} id="current"{/if}><a href="{$n.url}"
title="{if $n.pg_desc}{$n.pg_desc|escape:"html"}{else}{$n.pg_title|escape:"html"}
{/if}">{if
$n.pg_menutitle}{$n.pg_menutitle}{else}{$n.pg_title}{/if}</a></li>
{/foreach}
</ul>
</div>

Just asking, but if someone has a template with a similar menu that shows where you are[most do]] to convert or make from scratch is this the kind of code they will need to write so jojo can manage it? I realize that every cms has their own way of dealing with templates and that the documentation is in no way complete,and not so much a priority,but from what is there now I think you will really have to know your stuff if you want to put your own online---especially if you do not want to copy that exact kind of menu...

I did look a the documentation where it said if you know xhtml+css you will have no prob.. I do know enough to know what is going on and producing a validating template is not a problem with one[only one]] of my wysiwyg editors or stylemaster 4.6.

But I am curious if this kind of thing will have to be hand coded into the template when it is modified for jojo.....

I was kind of thinking of using this one out of the box or modifying it a little.

http://www.free-css-templates.com/demo/red-business/#

Rockstar
Harvey

Core Developer

Harvey

22 Jul 2007
Posts: 327

Hi there,

Good navigation is one of the most complicated aspects of designing websites. In the past, I have spent 3 or more days coding the CSS for a particular navigation structure (damn designers coming up with beautiful designs that are impossible to implement).

We actually have 2 ways of doing Navigation in Jojo. The default one you are referring to is the difficult way, but it's faster. The other way is much much simpler, but involves a few more database queries.

The simple way of doing things involves placing a Smarty variable called {$menu} somewhere in your template. Jojo will replace this variable with some standard looking unordered list HTML code. It's then up to you to add the CSS / Javascript to make the menu look and behave however you like.

I have just coded up that CSS template you referred to into a Jojo template, and you can download it from within this post. Once again, if anyone needs a Jojo template coded up we are happy to do this providing the template can be added to our template library (ie providing the license allows this sort of thing).

For this theme to work, you will need to have the jojo_article plugin installed, which is on by default anyway.

Let me know if this does the trick.

Attached Files

Harvey

Core Developer

Harvey

22 Jul 2007
Posts: 327

Also, for the record, I'd like to find a nicer way of inserting some default navigation structures into your template. We have produced all sorts of different nav structures for Jojo sites we have done internally, but it's a matter of turning that into a useful API for people like you.

I'd say we should have a better way of handling main nav in one of the next couple of releases.
rockstar rockstar

22 Jul 2007
Posts: 27

Once again.. Thank you Harvey.
Rockstar
subvert subvert

17 Aug 2007
Posts: 11

Josh
Back to Forum Index : Back to Themes Support   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.