Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get attributes from parent?  RSS feed

 
Matt Julson
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, I'm fairly new to working with JSP so I was wondering if anyone could help me figure this out.

I am calling the current content item that I am in with the following command:



With this, I can then pull all the attributes from this item using commands such as:



This content item is located inside a site area. So I also want to be able to get information from the parent. Actually, all I need is one field: .getName() from the site area. But I'm not sure how to go about doing this. Any suggestions? Thanks!


I've tried stuff like content.parent.getName();

and

Content parentArea = content.getParent();
parentArea.getName();


but nothing has worked so far. I just don't know the syntax to use I guess.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having trouble trying to see what this has to do with JSP. What's "Content"? It's not any standard class that I know of.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!