Is it possible to automatically reference a templates structural elements within another template?

78 views
Skip to first unread message

evil.midn...@gmail.com

unread,
May 30, 2013, 8:17:25 PM5/30/13
to reddot-c...@googlegroups.com
Hi, everyone.

I have this problem that I hope some of you can help with.

So, say I have a container (con_1) on a foundation template and another container (con_2) on a ‘layout’ template. This layout template reside in a 'layout' container on the foundation template. After creating an instance of both content classes, I’m able to use con_2 to reference  con_1 on the foundation. (See caveman diagram below)

Foundation template

---con_1

Layout template

---con_2 >>>con_1


This works for what I’m trying to do as it allows me to keep my original content in the appropriate fields and just alter the layout using the ‘layout’ template. This is needed for content migration purposes.

Now my question is can this be automated on the ‘layout’ template so that whenever an instance of the layout template is created, it knows to reference the foundation page’s container? I'm trying to do this for the benefit of the client's content editors ongoing maintenance.

Any help is much appreciated.

Regards,

EMB


Tiffany Portman

unread,
May 30, 2013, 10:54:42 PM5/30/13
to reddot-c...@googlegroups.com
preassign the containers at the template level...that should do it for ya



--
You received this message because you are subscribed to the Google Groups "RedDot CMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reddot-cms-use...@googlegroups.com.
To post to this group, send email to reddot-c...@googlegroups.com.
Visit this group at http://groups.google.com/group/reddot-cms-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
312-515-0480
www.tiffanyportman.com
TheTiffa...@gmail.com

evil.midn...@gmail.com

unread,
May 31, 2013, 12:03:38 AM5/31/13
to reddot-c...@googlegroups.com
Hi, Tiffany.

Thank you for your response.

I tried it and it doesn't seem to work.

I apologise for not being clear in my previous post. Here is what I'd like to be able to do:

1) Expand foundation template.
2) Double-click con_body container to put in clipboard.
3) Expand layout template
4) Select con_body container and click 'Reference Element in Clipboard' (Reference shows)
5) Create new instance of foundation and layout template (using a page definition)
6) Expand layout template instance
7) Reference to foundation's con_body kept

I was able to get something similar working by decoding the HTML of the foundation's con_body in a render tag. I was just hoping that I could 'keep it clean' by using references or the like.

Regards,
EMB

Scodazzi

unread,
May 31, 2013, 4:00:18 AM5/31/13
to reddot-c...@googlegroups.com
Hi EMB,
i think you could develop a custom plugin performing all the steps you described.

So, when you are on a "foundation template" page instance, instead of using the standard "Create page" functionality on "con_1", provide a custom plugin in order to perform all the steps as you described:
1) creation of a page (based on layout template) on "con_1" container
2) reference from "layout template > con_2" to "foundation template > con_1"

Open Text supports all the RQLs to do that.

Best Regards,
Sara.

evil.midn...@gmail.com

unread,
May 31, 2013, 11:09:29 PM5/31/13
to reddot-c...@googlegroups.com
Thank you for your response, Sara.

You confirmed what Richard Hauer's suggested (he and I had a chat after I posted this but before your response).

This is the path I will take.

Thanks again Tiffany, Sara, AND Richard for your help.

Regards,
EMB

Jian Huang

unread,
Jun 4, 2013, 5:25:03 PM6/4/13
to reddot-c...@googlegroups.com
Something I wrote to run on page (AJAX RQL) to reference an element to another (of the same page).  It can be extended to do what you want.

Best,
RetroactiveElementSelfReferences.zip

Richard Hauer

unread,
Jun 10, 2013, 1:11:35 AM6/10/13
to reddot-c...@googlegroups.com

Hey EMB – not sure if you are still following, but perhaps posting a follow-up of how we actually did this (including customer de-identified code) would be a good reference for the group?

 

Just a thought.

Jian Huang

unread,
Jun 10, 2013, 7:17:32 AM6/10/13
to reddot-c...@googlegroups.com, <reddot-cms-users@googlegroups.com>
I am going to guess either currentmasterpage.getelementbyname or currentpage.mainlink.ownerpage.getelementbyname is involved?

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages