← Back to team overview

phpdevshell team mailing list archive

Re: [Question #210568]: Anyway to remove the Front Page and Dashboard sub-links?

 

Question #210568 on PHPDevShell changed:
https://answers.launchpad.net/phpdevshell/+question/210568

    Status: Open => Answered

Greg proposed the following answer:
LOL it is possible :)

Let me explain how you can find out about it.

First, what you want is to alter the theme, so open the file
"/themes/cloud/theme.php" (provided you're using the default "cloud"
theme). You'll have the whole page at a glance. In your browser, right-
click the "front page" button and select "inspect element". You'll
notice the element is a LI inside an UL of ID "bread", itself inside a
DIV of ID "history". Compare to the theme php file and you'll find that
code:

			<div id="history">
				<ul id="bread">
					<?php $template->outputBreadcrumbs() ?>
				</ul>
			</div>

So you know what you have to change is the method "outputBreadcrumbs()"
of the PHPDS_template class. Open the file "PHPDS_template.class.php"
and look for the method:

	public function outputBreadcrumbs ()
	{
		// Check if output should be modified.
		if ($this->modifyOutputBreadcrumbs == false) {
			print $this->navigation->createBreadcrumbs();
		} else {
			print $this->modifyOutputBreadcrumbs;
		}
	}

Well the solution is now at hand: you just fill the field
"modifyOutputBreadcrumbs" with what you want, for example:


$default_bread = $this->navigation->createBreadcrumbs();
$my_bread = 'This goes <b>before</b> - '.$default_bread.' - this goes <b>after</b>';
$this->template->modifyOutputBreadcrumbs = $my_bread;

Of course this is a quick and dirty hack, because if another plugin does
the same, only the last change will be seen. However it can show how you
can easily change something by investiguating it.

-- 
You received this question notification because you are a member of
PHPDevShell, which is an answer contact for PHPDevShell.