Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
Hey there

I've spent all day searching for a resolution to this but can't seem to get my new portfolio categories into order. There is a folder 'New Work' which I need to stay at the top of the page, (The user will also want to order the rest of the Categories as they see fit.) Though as I added it after the other categories it only appears in that order. I have added a weight to all the dynamic folders but this only seems to order them in the admin side rather than on the site.

I'm not sure if its the way I have set the folders set up, I seem to have had to set up one set of folders in my Portfolio Categories section then remake them again under Manage Folders in my Portfolio Pages section for all the information to show up on the site. I'm sure I have buggered it up somewhere along the way! and am sure these folders are confusing each other. I started off following the tutorial then tweaked along the way to get what I needed-ish!

The more I look at it, the more confused I seem to become!

The page is: http://www.zubeidarobertsartist.com/portfolio.php

It would be lovely to find a solution.

Cheers
hi Sarah, have you used the orderby parameter? I do exactly this with dynamic folders for clients and it works fine ...

Code: Select all
<cms:folders depth='1' orderby='weight' >   
Thanks for your reply, I have tried putting it in mut it doesn't seem yo change anything. Maybe I am puttine it in the wrong place?

Cheers
Sarah,

This is not directly related to the topic at hand but (as we discussed at another thread viewtopic.php?p=17004#p17004) you are using a separate template to hold extra information about the folders.

Would you be interested in simplifying the setup?
Since you are essentially using only a simple text as the extra folder-info, let us ditch the auxillary template (i.e. portfolio_desc.php) altogether.

If you take a look a the dynamic folder edit screen (i.e. where you set the weights), you'll find two extra editable regions just below 'Weight' - 'Description' and 'Image'. We can use these to put in some extra info about folders. For your site, the 'Description' field will suffice.

Following are the steps if you agree to go along -
1. Edit the folders and add their description text in the 'Description' region mentioned above.
2. Your existing code (simplified) in the template is as follows -
Code: Select all
<cms:folders masterpage='portfolio.php'>
      
    ...
   
    <cms:pages masterpage='portfolio_desc.php' page_name=k_folder_name >
        <h4><cms:show k_folder_title /></h4>
        <span class="meta"><cms:show folder_blurb /></span>


        <cms:show folder_desc />
    </cms:pages>
   
    ...
   
</cms:folders>   

Let us remove the cms:pages loop that finds the matching page from the second template and use the native regions. Make the code as follows -
Code: Select all
<cms:folders masterpage='portfolio.php' >
     
    ...
   

    <h4><cms:show k_folder_title /></h4>
    <span class="meta"><cms:show k_folder_desc /></span>

   
    ...
   
</cms:folders> 
Please note that now we are using a new variable named 'k_folder_desc' - this holds the text you added ('k_folder_image' holds the image but we are not using that).

And that should be it. You won't need the second template.
Delete all pages of the second template and then delete the template itself as we won't be needing it.

A second unrelated point is that, I had a look at your template and, although, you are using dynamic folders, you have still defined a few 'static' folders e.g. as follows -
Code: Select all
<cms:folder name='cat_1' title='Silk Paintings' />
<cms:folder name='cat_2' title='Water Colours' />
<cms:folder name='cat_3' title='Cards' />
Since your template is using dynamic folders, we won't be needing these folders.

Please delete the definitions and refresh template as super-admin.
The folders will get deleted but the pages that were assigned to them will now no longer be in any folder. We'll fix that first.

Create the folders we deleted above by using the dynamic folders screen.
Now edit the orphaned pages and place them in these new folders.

This way we'll have only one kind of folders and now we can finally tackle the 'order' problem you mentioned.

As @potato suggested, add the parameter hilighted below to the code we amended above
<cms:folders masterpage='portfolio.php' orderby='weight' >

That should order folders according to their weights (more the weight, lower down the folder appears).

Hope this helps.
Please let us know.
Hi there

Sorry for the long silence after you have gone out of your way to help me. But thank you soo much! The whole thing you wrote was exactly what I wanted to acheive, it has really simplified something that was over complicated and I can get everything in order now.

Thank you for your time and paitence, I really do appreciate it.

:D :D xxxxx
You are always welcome, Sarah :)
Glad I could help.
6 posts Page 1 of 1