Okay, maybe helpful for some. But unfortunately just half-way through.
I build a catalog with projects (for a structural designer).
The client wants to show all the works he has been involved in. Some works were planned by architects, some by artists.
Now he has two more catalogs in which he enters either architects or artists.
In his main catalog he chooses from either one or the other catalog.
That´s how it looks in the backend:
In this case it is a project by an Artist "Erwin W". But, if the user EVER clicks the "Architekt" Checkbox and an Architekt from the list that pops up, this architect will always be displayed in the frontend, even if the checkbox "Architekt" is unchecked.
Now, made I´ve done is to create 2 reference modules. One for architects and on for artists.
I´ve made the following templates:
Module Catalog Reference Architects:
Code:
<?php if (count($this->entries)): ?>
<div class="layout_full">
<?php foreach ($this->entries as $entry): ?>
<div class="item<?php echo $entry['class'] ? ' '.$entry['class'] : ''; ?>">
<div id="archart">
<h2>Architekt</h2>
<?php if ($entry['data']['architect_check']['raw']):?>
<?php echo $entry['data']['title']['value']; ?>
<?php endif; ?>
<?php foreach ($entry['data'] as $field=>$data): ?>
<?php if (strlen($data['raw']) && !in_array($field, array('catalog_name','parentJumpTo'))): ?>
<div class="field <?php echo $field; ?>">
<div class="label"><?php echo $data['label']; ?></div>
<div class="value"><?php echo $data['value']; ?></div>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
</div>
<?php else: ?>
<?php endif; ?>
Module Catalog Reference Artists:
Code:
<?php if (count($this->entries)): ?>
<div class="layout_full">
<?php foreach ($this->entries as $entry): ?>
<div class="item<?php echo $entry['class'] ? ' '.$entry['class'] : ''; ?>">
<div id="archart">
<h2>Künstler</h2>
<?php if ($entry['data']['artist_check']['raw']):?>
<?php echo $entry['data']['title']['value']; ?>
<?php endif; ?>
<?php foreach ($entry['data'] as $field=>$data): ?>
<?php if (strlen($data['raw']) && !in_array($field, array('catalog_name','parentJumpTo'))): ?>
<div class="field <?php echo $field; ?>">
<div class="label"><?php echo $data['label']; ?></div>
<div class="value"><?php echo $data['value']; ?></div>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
</div>
<?php else: ?>
<?php endif; ?>
This ALMOST works. The problem now:
If the checkbox for Artists is unchecked the artist will not be display but the ID is always shown.
I have no Idea how to get rid of that.
If I uncheck the Architects and check the Artists, it´s just the other way around: the ID for the Architects shows up and the name of the artists in the second module...
Here a link to the module: https://skitch.com/valentinruhry/rg5...source-cms-2.9
Thanks for your help!
Best,
Valentin
Bookmarks