Hello Kamran happy new year!
Long time no new website but now I'm on again and struggling with listing pictures from folders related to some pages of another template.
What I want to achieve:
I want to make a listing of pictures which can be listed on the one hand by product category and on the other hand by the material they are made of.
Therefore I created a gallery and a clonable template "material.php". The folders of the gallery can be related to the pages of the material template by using the extended folders:
galerie-folders.php looks like this:
material_liste.php is a snippet which looks like this
Now with this relation in place I go to my gallery template galerie.php
and create the first list for the folders of the gallery were I can list the products by category folder:
This is working as intended.
Now I want to create a second list with the materials
I have no clue how to create the link above to show the pictures related to one kind of material in the list view. Should I make a variable out of the "related_material"? But then I need a additional submit button, right? Or is there another easy option I cant see.
At the moment the pictures are listed like this for the categories but I guess there also have to be made changes to use it to show the pictures related to the materials.
Thank you very, very much for your help!
Long time no new website but now I'm on again and struggling with listing pictures from folders related to some pages of another template.
What I want to achieve:
I want to make a listing of pictures which can be listed on the one hand by product category and on the other hand by the material they are made of.
Therefore I created a gallery and a clonable template "material.php". The folders of the gallery can be related to the pages of the material template by using the extended folders:
- Code: Select all
<cms:template title='Bilder Galerie' clonable='1' dynamic_folders='1' gallery='1' order='20' folder_masterpage='galerie-folders.php'>
xxx
</cms:template>
galerie-folders.php looks like this:
- Code: Select all
<?php require_once( 'cms/cms.php' ); ?>
<cms:template title='Galerie Folder' clonable='1' hidden='1' order='100'>
<cms:editable
name="related_material"
label="Material"
opt_values='material_liste.php'
dynamic='opt_values'
type='dropdown'
desc='choose your material'
/>
</cms:template>
<?php COUCH::invoke(); ?>
material_liste.php is a snippet which looks like this
- Code: Select all
Choose material
<cms:pages masterpage="material.php">
| <cms:show k_page_title /> = <cms:show k_page_name />
</cms:pages>
Now with this relation in place I go to my gallery template galerie.php
and create the first list for the folders of the gallery were I can list the products by category folder:
- Code: Select all
<h4>Kategorie</h4>
<ul>
<li><a href="<cms:link masterpage='galerie.php' />#galerie" title="All pictures"><strong>All Pictures</strong></a></li>
<cms:folders depth='1'>
<li><a href="<cms:show k_folder_link />#galerie" title="<cms:show k_folder_title />"><cms:show k_folder_title /></a></li>
</cms:folders>
</ul>
This is working as intended.
Now I want to create a second list with the materials
- Code: Select all
<h4>Material</h4>
<ul>
<cms:pages masterpage='material.php' >
<li><a href="<??? no idea how to create the link here???>" title="<cms:show k_page_title/>"><cms:show k_page_title/></a></li>
</cms:pages>
</ul>
I have no clue how to create the link above to show the pictures related to one kind of material in the list view. Should I make a variable out of the "related_material"? But then I need a additional submit button, right? Or is there another easy option I cant see.
At the moment the pictures are listed like this for the categories but I guess there also have to be made changes to use it to show the pictures related to the materials.
- Code: Select all
<cms:pages masterpage='galerie.php' folder="<cms:show k_folder_name/>">
<li>
<figure>
<a href="<cms:show gg_image/>" data-lightbox="<cms:show k_folder_name/>x" title="<cms:show k_page_title/>">
<span class="thumb-screen"></span>
<img src="<cms:show gg_thumb/>" alt="<cms:show k_page_title/>"/>
</a>
<figcaption>
<cms:show k_page_title/>
</figcaption>
</figure>
</li>
</cms:pages>
Thank you very, very much for your help!