Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global alias or how to pull a block #57

Open
nistormihai opened this issue Apr 22, 2012 · 0 comments
Open

Global alias or how to pull a block #57

nistormihai opened this issue Apr 22, 2012 · 0 comments

Comments

@nistormihai
Copy link

I'm trying to write a
base template with blocks witch after in a
child template to reuse only some blocks from the base template and I followed global alias help for dust
but when I use them with partial doesn't want to work.

greeting.dust

{<greeting}Hello, Hola{/greeting}   
{<world} Us, Spain{/world}

partial_end.dust

{#names}
  {.} {+greeting/}
{/names}

{#projects}
  {.} {+greeting/}
{/projects}
{>greeting_template/}

partial_begining.dust

{>greeting_template/}
{#names}
  {.} {+greeting/}
{/names}

{#projects}
  {.} {+greeting/}
{/projects}

In only one file it works like this:

greeting_begining.dust

{<greeting}Hello, Hola{/greeting}   
{<world} Us, Spain{/world}
{#names}
  {.} {+greeting/}
{/names}

{#projects}
  {.} {+greeting/}
{/projects}

but I need to separate the blocks in other files.
Can some one help? I there any other way of doing this?
If now there is an real issue with this maybe I can contribute to dust and try to fix this.

PS: from the main examples it seem that blocks are global when included from partials, but this is the other way around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant