Link to content for an specific content type

8 views
Skip to first unread message

mvelasco

unread,
Oct 22, 2017, 11:01:11 AM10/22/17
to dotCMS User Group
Hi everyone, I added an internal menu (intranet side) using angular but for somedays I was trying to figure out how to add links to specific content type search. For example, I want to add a link to Banner content type, once the link is clicked redirect to /#/content, how can I do to redirect in order to see all banner contentlets?
I tried added ?structure_id=<banner_inode> but redirect to workflow.

Any idea?
Best

Mark Pitely

unread,
Oct 23, 2017, 10:26:55 AM10/23/17
to dot...@googlegroups.com
You could either build a page that took the structureName as a variable and then built a query of the content to show, or do the something similar with the API.
I think all content has a 'title' field. That is, if nothing is set title it takes the first text field and marks it content. Otherwise you might need to do a little #if($UtilMethods.isSet()) around some normal field names. All the field name data is in the content pull, but it would not be trivial to extract the fields from a generic piece of content. The API return in JSON would probably be easier to extract the fields from with a 'proper' programming language.

Alternatively, you could probably reverse engineer whatever the backend dojo javascript does when you switch type in the content tab.

Mark Pitely
Marywood University

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+unsubscribe@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/2f9cba2c-b83c-4c27-a4ff-8ec5e74e7fed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages