Storing information using render tags inside navigation templates

249 views
Skip to first unread message

Evandro Moreno

unread,
Mar 21, 2012, 6:31:29 PM3/21/12
to reddot-c...@googlegroups.com
Hi everyone,

Is there a way to store information using a render tag inside a navigation template?

Here is the situation: I have to apply a different style to the current index headline based on if the previous index in the same level had children indexes or not. For example, if the site had the following structure,

Page 1
 Subpage A
 Subpage B
Page 2
Page 3

I want the "Page 2" headline to show in a different color.

Since there isn't a Context:NextIndex or Context:PreviousIndex render tag I need to learn if the CurrentIndex has a child, store this info somewhere an read it in the next index of the same level.

I thought about using vbscript or php. However, I don't think that the results would show on the SmartEdit mode, which will confuse my users.

Any ideas and help would be greatly appreciated.

Best.




Tony Gayter

unread,
Mar 22, 2012, 3:13:20 AM3/22/12
to reddot-c...@googlegroups.com
If you do this in preexecute it should show in smart edit, just watch out for teh 'declaring a variable inside a list loop' gotcha which has got me a few times.





--
You received this message because you are subscribed to the Google Groups "RedDot CMS Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/reddot-cms-users/-/nM4q2DuBkkIJ.
To post to this group, send email to reddot-c...@googlegroups.com.
To unsubscribe from this group, send email to reddot-cms-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/reddot-cms-users?hl=en.

Richard Hauer

unread,
Mar 22, 2012, 3:23:58 AM3/22/12
to reddot-c...@googlegroups.com

You can use Store:Set( key, val ) and Store:Get( key ), which operate at the session level (*warning*) to store and retrieve arbitrary values.

Remember, these are at the session level so be careful with your keys.

 

Regards,

Richard Hauer

Solution Architect

p +61 2 9321 1555 | d +61 2 9321 1556 | m +61 414 189 170

Jian Huang

unread,
Mar 22, 2012, 9:56:59 AM3/22/12
to reddot-c...@googlegroups.com, richar...@5limes.com.au
Hi everyone,

I wrote a blog post regarding rendertag usage best practices that is tied to this topic

http://simplyreddot.blogspot.com/2012/03/rendertag-project-performance-product.html

I hope it is useful.

Best,

-Jian

--

To post to this group, send email to reddot-cms-users@googlegroups.com.
To unsubscribe from this group, send email to reddot-cms-users+unsubscribe@googlegroups.com.


For more options, visit this group at http://groups.google.com/group/reddot-cms-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "RedDot CMS Users" group.

To post to this group, send email to reddot-cms-users@googlegroups.com.
To unsubscribe from this group, send email to reddot-cms-users+unsubscribe@googlegroups.com.

Evandro Moreno

unread,
Mar 22, 2012, 1:49:55 PM3/22/12
to RedDot CMS Users
Thank you, Tony, Richard and Jian. Very helpful information. I am
going to try both suggestions.

Richard and Jian, do you know where I can get some documentation for
the Store:Set and Store:Get variables?

Thank you again,

Evandro.

On Mar 21, 6:31 pm, Evandro Moreno <evandro...@gmail.com> wrote:
> Hi everyone,
>
> Is there a way to store information using a render tag inside a navigation
> template?
>
> Here is the situation: I have to apply a different style to the current
> index headline based on if the previous index in the same level had
> children indexes or not. For example, if the site had the following
> structure,
>
> Page 1
>  Subpage A
>  Subpage B
> *Page 2*

Jian Huang

unread,
Mar 23, 2012, 9:34:43 AM3/23/12
to reddot-c...@googlegroups.com
Hi Evandro,

You can find Management Server documentation at

https://knowledge.opentext.com/knowledge/cs.dll?func=ll&objId=15437653&objAction=browse&viewType=1

Please note that the Store function will not be found within documentation since it is not official.

Best regards,

-Jian

Richard Hauer

unread,
Apr 1, 2012, 10:43:13 PM4/1/12
to reddot-c...@googlegroups.com

I’ve seen the “Store” context loader object documented with respect to a for loop but not stand-alone – in a quite early version of the support.

 

When I learned of it, I decided to investigate further, to understand how it works so that I could establish whether it could be used outside of a loop – it can.  Supported/not – I can’t tell you that.

 

Regards,

Richard Hauer

Solution Architect

p +61 2 9321 1555 | d +61 2 9321 1556 | m +61 414 189 170

 

From: reddot-c...@googlegroups.com [mailto:reddot-c...@googlegroups.com] On Behalf Of Jian Huang
Sent: Saturday, 24 March 2012 12:35 AM
To: reddot-c...@googlegroups.com
Subject: Re: Storing information using render tags inside navigation templates

 

Hi Evandro,

--

You received this message because you are subscribed to the Google Groups "RedDot CMS Users" group.

To view this discussion on the web visit https://groups.google.com/d/msg/reddot-cms-users/-/KCYcYDoP1joJ.
To post to this group, send email to reddot-c...@googlegroups.com.
To unsubscribe from this group, send email to reddot-cms-use...@googlegroups.com.

Evandro Moreno

unread,
Apr 3, 2012, 3:29:20 PM4/3/12
to reddot-c...@googlegroups.com
Thank you all for the help. I am looking into it.

Thanks,

Evandro Moreno

unread,
Apr 3, 2012, 5:29:05 PM4/3/12
to reddot-c...@googlegroups.com, richar...@5limes.com.au
Richard,

When you say "session level" do you mean like in a server side session variable? So let's say I am logged in to the CMS and I am editing a page. Will the Store:Set and Store:Get values be available only to me in my session or to all the users in my project?

Thanks again,

Evandro.


On Thursday, March 22, 2012 3:23:58 AM UTC-4, Richard Hauer (5 Limes) wrote:

Jian Huang

unread,
Apr 17, 2012, 11:05:36 AM4/17/12
to reddot-c...@googlegroups.com, richar...@5limes.com.au
Hi Richard,

It is still documented as within the use of a forloop.

As you may have discovered, usage of Store outside of forloop is possible, but the output is inconsistent, and since it is not documented, it should not be used within any project.

To post to this group, send email to reddot-cms-users@googlegroups.com.
To unsubscribe from this group, send email to reddot-cms-users+unsubscribe@googlegroups.com.

Joel Kinzel

unread,
Jun 14, 2012, 6:37:49 PM6/14/12
to reddot-c...@googlegroups.com
I'm late to the game, but why not use JavaScript in pre-execute to do this or am I am missing a problem with doing so?
Reply all
Reply to author
Forward
0 new messages