Beduc:
If you take a look at the top left corner of this page, you'll see, in the browser banner, a legend stating "XOOPS Official Site - Forum - Microsoft Internet Explorer" or something like this. The first part is the site name, the second is the present module name.
Where is this code in the template (
theme.html)? Right where the TITLE tag is. It says:
<{$xoops_sitename}> - <{$xoops_pagetitle}>So, there you have the variables you need, already defined. What you need to do is to enclose the first one in a link to your home. This is the way it's solved in Punto flotante:
<td id="breadcrumb" colspan="2">
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
<tr>
<td width="10">
td>
<td>
<div class="breadText">
<a href="<{$xoops_url}>"><{$xoops_sitename}>a> > <{$xoops_pagetitle}>
div>
td>
<td width="5">
td>
tr>
table>
td>
You can use other styles, DIVs instead of tables or whatever HTML solution you want, but you need to define the path as:
<{$xoops_sitename}> > <{$xoops_pagetitle}>Perhaps you want to go further than just the home and the module name... What about the article name if you're in the news module? To do this you have to edit the file
modules/news/article.php. Before the final two includes in the file (around line 116), add the following:
$xoopsTpl->assign('xoops_pagetitle', htmlentities($xoopsModule->name() . ' > ' . $article->title()));This line will assign to the Smarty variable $xoops_pagetitle (remember it?) a long string that includes the module name, the character '>' and the name of the article. This is the way it's solved in Punto flotante.
Want to go even further? What about including the link in the module name? In this case, what you need to add to article.php es 2 lines instead of one. Add:
$linktomodule = "/modules/news/index.php\">".htmlentities($xoopsModule->name()."";
$xoopsTpl->assign('xoops_pagetitle', $linktomodule . ' > ' . $article->title()));This will assign to variable $linktomodule the link to the start page of news and then create a long string that includes this link and the article name, and assign that long variable to the same Smarty variable as above.
Hope this helps.
Cheers