Template Variables do not update from default values - modx

I'm new to ModX, but I have created a Template Variable (TV) for an Image ( image-1 ) .
Then I set a default value, and assign the TV to my Home_Template, click save.
Create some simple html in that template:
<li>[*image-1*]</li>
As expected, the template variable is available on this screen. So I select the image I want to display, and save. It appears in the preview for this template screen, but not on the actual website.
Any ideas?

check your caching settings ~ probably best to turn off caching completely during development.
also try calling your snippets & variables as 'uncached' ex:
[!*image*]
this looks like evolution code, best to switch to revolution if at all possible.
-sean

Related

How to #set a variable to make it available in an included velocity template

I'm creating a custom theme for Liferay, I wish to include the footer within each page layout individually. Unfortunately, I don't appear to have access to the $full_templates_path variable within the page layout files. I have had no luck manually storing the value with #set and then accessing that value within the included template.
In a vanilla theme, processing of files is something like this:
portal_normal.vm:
1) some init, doctype, etc.
2) #parse("$full_templates_path/header.vm")
3) $theme.include($content_include)
a) custom_layout_1.tpl
b) chat portlet
4) #parse("$full_templates_path/footer.vm")
For layout purposes, I need to deviate from this pattern, like so:
portal_normal.vm
1) some init, doctype, etc.
2) #parse("$full_templates_path/header.vm")
3) $theme.include($content_include)
a) custom_layout_1.tpl
i) #parse("$full_templates_path/footer.vm")
b) chat portlet
When I try this, tomcat errors out because $full_templates_path is not defined within custom_layout_1.tpl. I tried to fix this problem by doing the following within portal_normal.vm
#set($full_footer_path = "$full_templates_path/footer.vm")
$theme.include($content_include)
And then, within custom_layout_1.tpl, I do this where I'd like the footer markup emitted:
#parse("$full_footer_path")
However, tomcat still errors out, saying that $full_footer_path is not defined.
When I hard-code the value of $full_templates_path into #parse statement in custom_layout_1.tpl, everything works fine, but that seems like a hack to me.
Ideally, this should do the right thing for the right reasons, not just because I used a lot of duct tape.
Any suggestions for ways to implement the inclusion of a template file from within a custom page layout?
The issue could be due to your velocity configuration.
The following property should be false velocimacro.permissions.allow.inline.local.scope if you want to access variables set in one template to be accessible in another
You may have miss-typed your question but shouldn't #set($full_footer_path = "$full_templates_path/footer.vm" have a close bracket at the end...
#set( $full_footer_path = "$full_templates_path/footer.vm" )
It might also help to wrap $full_templates_path in curly braces to distinguish it from the rest of the text i.e ${full_templates_path}

Drupal 6 Availability of View Basic Settings Variables

I've been doing some basic view theming with Drupal 6, but I'm having a difficult time figuring out how to access certain variables. Here is my setup:
I have one view with several block displays.
I three templates I'm using to override the default:
views-view-unformatted-my-list-blocks.tpl.php (styles template)
views-view-my-list-blocks.tpl.php (rows template)
views-view-fields-my-list-blocks-block-1.tpl.php (an example display template)
Now, if I just copy the default code into the templates, everything seems to display as it should. But I noticed that in my styles template, the title variable is there, but nothing comes out. Even when I set my display title in basic settings, nothing shows. I would also like to access my CSS class variable from the basic settings, but I'm not sure what variable to use for that either.
Can anyone shed some light on these?
Here is an example on doing this
http://www.expresstut.com/content/themeing-views-drupal-6
http://www.expresstut.com/content/themeing-views-drupal-6-part-2

How do i overwrite the default drupal6 block template?

I want to customize the default block of drupal 6 such that i have my own template for different blocks ..How can I achieve that ?
Steps to customize block.tpl.php
Copy block.tpl.php file from your current enabled theme.
Paste it.
Name it like : block-{machine readable name of your block(or
block-id)}.tpl.php
Note: "Do not use Curly brackets {}. It just for separation"
go to admin part of your site and flush all cache.
That's it. go to the place where you decide to display block and made changes in your customize block-{your block name}.tpl.php file.
1) goto the theme folder
2) copy the content of block.tpl.php to a new file block-div-id.tpl.php, where block-div-id is the div id of the block which you want to customize.
3) Now this template will be used to render that block.

A bit confused with creating custom content parts and placement

I'm trying to create a Custom Part that just drops text into the page. I've created a part using the GUI that I called "Side Feature" and I added a text field called "Featured". I am trying put it on the side bar which I created on my layout, but I don't know how to move it to the sidebar. It shows up on my main content.
How do I move it to the sidebar? I tried using "#Display(Model.Featured)", but that doesn't seem to work. I also read about the placement.info file, but I'm not too sure how that would work in this sense.
I couldn't find a tutorial/blog post online similar to this. Most of them were too advanced. I am very new to Orchard.
You can't without code or additional module: sidebar is a zone for widgets, not for content parts. Placement info only works for local zones within the global Content zone.
If you want to do it through code, follow this: http://weblogs.asp.net/bleroy/archive/2011/03/26/dispatching-orchard-shapes-to-arbitrary-zones.aspx
If you want to use a module, look for Origami on the gallery.

Expression Blend's default LayoutRoot

Is there a way to change the default LayoutRoot type in Expression Blend 3? Currently, I'm prototyping in SketchFlow, and I prefer Canvas over the Grid, and it's annoying to change it for every new screen.
Here is answer that will work, but you will need to change the templates:
Back up the contents of the template directory which resides here:
%ProgramFiles%\Microsoft Expression\Blend 3\Templates\
Find the templates being used in:
%ProgramFiles%\Microsoft Expression\Blend 3\Templates\(CSharp|VisualBasic)\
In that directory there will be 4 relevant templates:
SketchFlowCompScreen,
SketchFlowCompScreenSL,
SketchFlowNavScreen,
SketchFlowNavScreenSL
If you edit the xaml files within these, whenever you create a new screen in SketchFlow the screens will use your changes.

Resources