Use Item_Model::relative_url() instead of relying on
Item_Model::$relative_url_cache directly.
This commit is contained in:
parent
1b002243a7
commit
1023321cff
@ -398,7 +398,7 @@ albumTree.config.cookieDomain = '';
|
||||
<?
|
||||
function addtree($album){
|
||||
?>
|
||||
albumTree.add(<?= $album->id -1 ?>, <?= $album->parent_id -1 ?>, "<?= $album->title ?>", pf+'<?= $album->relative_url_cache ?>');
|
||||
albumTree.add(<?= $album->id -1 ?>, <?= $album->parent_id -1 ?>, "<?= $album->title ?>", pf+'<?= $album->relative_url() ?>');
|
||||
<?
|
||||
foreach ($album->viewable()->children(null, null, array(array("type", "=", "album"))) as $child){
|
||||
addtree($child);
|
||||
|
@ -15,7 +15,7 @@ function makelist($album,$level){
|
||||
//print out the list item
|
||||
?>
|
||||
<li>
|
||||
<a href="<?= item::root()->url() ?><?= $album->relative_url_cache ?>"><?= str_repeat(" ", $level) ?><?= $album->title ?></a>
|
||||
<a href="<?= item::root()->url() ?><?= $album->relative_url() ?>"><?= str_repeat(" ", $level) ?><?= $album->title ?></a>
|
||||
</li>
|
||||
<?
|
||||
//recurse over the children, and print their list items as well
|
||||
|
@ -4,7 +4,7 @@
|
||||
function makeselect($album, $level){
|
||||
//print out the list item as a select option
|
||||
?>
|
||||
<option value="<?= item::root()->url() ?><?= $album->relative_url_cache ?>"><?= str_repeat(" ", $level) ?><?= $album->title ?></option>
|
||||
<option value="<?= item::root()->url() ?><?= $album->relative_url() ?>"><?= str_repeat(" ", $level) ?><?= $album->title ?></option>
|
||||
<?
|
||||
//recurse over the children, and print their list items as well
|
||||
foreach ($album->viewable()->children(null, null, array(array("type", "=", "album"))) as $child){
|
||||
|
Reference in New Issue
Block a user