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

$block.WIDTH not assigned, $block.given_width instead #9

Open
tkuther opened this issue Oct 10, 2017 · 0 comments
Open

$block.WIDTH not assigned, $block.given_width instead #9

tkuther opened this issue Oct 10, 2017 · 0 comments

Comments

@tkuther
Copy link

tkuther commented Oct 10, 2017

I'm trying to add better support for PWG_Stuffs into Bootstrap Darkroom, the templates can be overridden by the theme, which is great.
But I'm having a really hard time understanding some of the template variables.

For example in stuffs_blocks.tpl there is a {if !empty($block.WIDTH)}style="width: {$block.WIDTH}%;"{/if}
https://github.com/Piwigo/PWG_Stuffs/blob/master/theme/template/stuffs_blocks.tpl#L6

Though, I'm unable to get a $block.WIDTH assigned to the template. If I set a blocks line ID to something, let's say A, and width to 50, this is what I get when doing a {$block|@print_r} in the template's foreach loop:

Array
(
    [U_LOST_PASSWORD] => password.php
    [F_LOGIN_ACTION] => identification.php
    [authorize_remembering] => 1
    [TEMPLATE] => stuffs_logon.tpl
    [ID] => 3
    [TITLE] => Anmeldung
    [id_line] => A
    [given_width] => 50
    [CLASS] => middle_block
    [new_line] => 
    [end_line] => 1
)

It does have a given_width, but no WIDTH like it's used in the template.

Is there an issue with my installation (tried two Piwigo instances each running Piwigo 2.9.2 and the latest version of the Plugin), or is that bug?

@tkuther tkuther changed the title Inconsitency in templates vs. variables Inconsistency in templates vs. variables Oct 10, 2017
@tkuther tkuther changed the title Inconsistency in templates vs. variables $block.WIDTH not asigned, $block.given_width instead Oct 10, 2017
@tkuther tkuther changed the title $block.WIDTH not asigned, $block.given_width instead $block.WIDTH not assigned, $block.given_width instead Oct 10, 2017
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