how to - Permalink from imported category included in code generator

7 posts by 3 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: June 10, 2020   (RSS)

By pixelMIGHT(Josh) - June 3, 2020

Hello. I hope I can explain this well. 

I have a multi record editor called Artwork. In it, I import a list of categories from another multi record using 'Get options from database'. The category records have a permalink. Everything there works fine and I have a sortable gallery with permalinks when the categories are sorted. Then, if you click on an image from Artwork, you get the detail page of that image. Pretty straight forward and common. 

My struggle is on the detail page, itself. Under the artwork image I list out the categories that artwork is in. I would like those categories to be clickable and then the user can get back to the list page and see all the artwork in the categories. However, I can't figure out how to import the category permalink to the artwork detail page in order to make it a link back to the category page.

Image attached for visual reference. 

Any advise is appreciated.


click.jpg 581K

By Steve99 - June 4, 2020


Sounds like a similar scenario as this post:

Referencing that post, essentially the "Restaurants" would be your "Artwork" records and the "Cuisines" would be your "Categories" records.

Hope this helps!


By Damon - June 4, 2020

Hi Josh,

The forum post link that Steve posted should have everything you need to get the results you are after.

Can you review and let us know if you have any questions about it that we can help with?

Damon Edis -

Hire me! Save time by getting our experts to help with your project.

By pixelMIGHT(Josh) - June 5, 2020

Thanks, guys. At a glance, that looks right. I'll be giving it a try next week and will post here about it. 

~ Josh

By Steve99 - June 10, 2020

Hi Josh,

Glad to hear it helped.

This should work if you're looking to skip the first item of an array:

<?php foreach (array_slice($art_categoriesRecords,1) as $record): ?>


By pixelMIGHT(Josh) - June 10, 2020

Thank you! That is exactly what I needed. I was trying to do similar, but had the ",1" on the wrong side of the parentheses. I just don't write PHP enough to ever get even passably good at it... or even figure out what to search for sometimes. So, this is is much appreciated and saved me a lot of frustration.