webguys-de / EasyTemplate

42 stars 13 forks source link

Question: How to get Template Name #19

Open arosenhagen opened 8 years ago

arosenhagen commented 8 years ago

Since there's the option to define the name of a template - how can we get this in the coded (phtml) templates? In the examples there's only <?php echo $this->getTemplateCode() ?> present.

tobi-pb commented 8 years ago

Name is only an information in admin area so we don't provide it in case of frontend rendering at this time.

Could you explain your use case please?

arosenhagen commented 8 years ago

The use-case was to have a headline on the frontend. Of course we can add an extra field for it, but in the day-to-day work it's not very useable (nor DRY) to have two entities with the same content (where the Template Name would then eventually be ignored as it has no effect on the frontend).

tobi-pb commented 8 years ago

Name should be an internal name not a headline or something else. for the simple reasion that not every template should have a name field :-)

So, please add an extra field and explain your shop manager that they could use it for internal naming stuff. Like "slideshow for logged in customers"

We are going to make some difference here in magento 2 implementation, so thanks for your feedback