# Understanding contextual, page parts and slug

**URL:** <https://www.ruby-forum.com/t/understanding-contextual-page-parts-and-slug/111038>\
**Category:** Radiant CMS\
**Created:** [August 2, 2007, 3:36am UTC](https://www.ruby-forum.com/t/understanding-contextual-page-parts-and-slug/111038 "2007-08-02T03:36:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![soster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/848f3c/32.png) [@soster](https://www.ruby-forum.com/u/soster)\
**Post date:** [August 2, 2007, 3:36am UTC](https://www.ruby-forum.com/t/understanding-contextual-page-parts-and-slug/111038/1 "2007-08-02T03:36:47Z")

</div>

I believe I’m thinking about this wrong but I can’t figure out exactly  
how,  
can anyone here point on my flaw in logic?

LAYOUT:

# Section:

PAGE “Authors”, PART “section”:  
\<r:slug /\>

PAGE “Ian M. Banks”, NO “section” PART

(Assume the “Ian M. Banks” page is underneath “Authors”)

By my way of thinking the “Authors” page part “section” will evaluate to  
the  
Author’s page slug, which is “authors”, so you’ll see:

“Section: Authors”

Which is exactly what it does.

When the “Ian M. Banks” page renders the layout will be processed and  
the  
“section” page part will be requested. Since this page doesn’t have a  
“section” page part it will inherit from it’s parent’s “section”, which  
was  
already evaluated to “Authors”. Since the contextual flag was set to  
false  
it won’t reprocess the r:slug command in the the context of the current  
page, yet it does so you get this:

“Section: Ian M. Banks”

So, the question is why does the r:slug get evaluated in the context of  
a  
child page even though it’s actually inheriting from the parent and the  
parent explicitly set the the contextual false flag? Also, is there a  
better way to achieve what I’m attempting, creating sections that stay  
semi-static?

Thanks,  
Shawn
