Single Content Type Index + Single Format for multiple pages/topics?
We have a press release/news and info feature we are building. We want the various departments in our organization to be able to use this feature and tag items appropriately. Then, based on the tags used in the metadata the articles will show up on the appropriate pages.
We are trying to use the same content type index block on each department's pages. I would love to accomplish this without writing 40+ different formats. Is there a way to program the format to pull which tags to use from the metadata of the containing folder of the current page? The way I'm doing it right now, I can't seem to access the metadata from the containing folder if I'm applying the format to the content type index block. Or any other way to avoid writing 40+ individual formats?
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ryan Griffith on 27 Jun, 2014 05:31 PM
Hi,
If you are using a Content Type Index Block, you won't be able to access any folder information for the pages, because these Index Blocks only pull in Page assets.
That being said, depending on what version of Cascade Server you are currently running, you could use the path of the page in conjunction with the Locator Tool to access information pertaining to the parent folder such as dynamic metadata.
Please let me know if you have any questions.
Thanks!
2 Posted by jriley on 01 Jul, 2014 01:22 PM
Ryan,
Thanks for your reply and sorry I'm so long in getting back to you. I'm having trouble with this still. Here is what I tried, leaning on another discussion from this forum. Obviously this code isn't going to do anything, I'm just trying to get it to pull anything at all before I write the rest of it.
And here is the xml metadata from the folder I'm trying to access in this case:
Am I even in the vicinity of the right track here?
3 Posted by Ryan Griffith on 01 Jul, 2014 02:32 PM
Hi,
You are definitely close; however, you will need to loop over the dynamic field's
values
property to obtain each value:Alternatively, if you just need to output a comma delimited list, you could implode the values array using the Display Tool:
$_DisplayTool.list($dynamic.values, ",")
Please let me know if you have any questions.
Thanks!
4 Posted by jriley on 01 Jul, 2014 06:20 PM
That got it doing what I needed. Thank you!
5 Posted by Ryan Griffith on 01 Jul, 2014 07:10 PM
Thank you for following up, I am glad to hear the Velocity code did the trick.
I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.
Have a great day!
Ryan Griffith closed this discussion on 01 Jul, 2014 07:10 PM.