I'd like to understand how to combine these two elements into a twig set vars.
--
Context: I'm building a dynamic template that will list entries from which ever section the URL segment loads. For example /news will be news articles.
Each template will have a page title variable that I'm sending up to the _layout master. The page title's are input using craft.global's I have them setup like this {{ news.pageTitle }}.
In my dynamic template I'm trying to load everything from the URL slug. For example if it loaded the /notices URL the template would render the global: {{ notices.pageTitle }}.
--
Craft global: {{ news.pageTitle }}
URL Segment (/news): {% set getSegment = craft.request.getSegment(1) %}
This works: {% set pageTitle = news.pageTitle %}
But this doesn't: {% set pageTitle = getSegment.pageTitle %}
getSegment
is going to be a string so it won't have a property calledpageTitle
on it.