Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Ein Block vom Parent.tpl dessen Include erreichen

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
RaymondE
Smarty n00b


Joined: 29 Nov 2016
Posts: 4

PostPosted: Tue Nov 29, 2016 12:59 pm    Post subject: Ein Block vom Parent.tpl dessen Include erreichen Reply with quote

Hallo liebe Gemeinschaft,

ich habe folgendes Problem:
Ich möchte auf ein Block zugreifen, welches sich im extendend Parent.tp, dessen Include.tpl befindet. Nur ich weiß nicht wie.

Folgender Aufbau ist gegeben:
Vendor (Child Theme) extends Vendor (Parent Theme)

Vendor (Parent Theme) extends Index (Parent Theme)

Index (Parent Theme) includes Header (Parent Theme)


Und ich möchte vom Vendor (Child Theme) aus, ein Block aus Header (Parent Theme) erreichen.

Ist das überhaupt möglich?

Über eure Hilfe wäre ich überaus dankbar!


Best Grüße,
Ray
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Tue Nov 29, 2016 6:58 pm    Post subject: Reply with quote

A code sample would help better than an elaborate description.
But from the look of it, you don't understand, what blocks are used for.
You don't "reach" them, you replace them, or prepend/append, as desired.
Back to top
View user's profile Send private message
RaymondE
Smarty n00b


Joined: 29 Nov 2016
Posts: 4

PostPosted: Tue Nov 29, 2016 8:25 pm    Post subject: Reply with quote

My issue is based on the Shop-System Shopware.

So i have the "bare theme" which represents the ground structure of the whole template.

On that theme, i have my own custom theme which expands and (like you said) replaces the blocks how i want it too.


What i want to change in my partikular case is that Shopware creates special Vendor Sites for every brand i have in my system. I would like to set these to noindex (meta-tag in the header).

The Vendor.tpl extends the Listing.tpl (which are the categories in my shop).

And the Listing.tpl includes the Header-Listing.tpl which extends the Main-Header.tpl


What i'm trying to do is to replace the meta-Block in the header for just the Vendor.tpl


I hope my problem is understandable.


Thank you!
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Tue Nov 29, 2016 11:11 pm    Post subject: Reply with quote

Wouldn't it be easier ro make that happen via robots.txt ?
Since you want to prevent whole site from indexing.
Back to top
View user's profile Send private message
RaymondE
Smarty n00b


Joined: 29 Nov 2016
Posts: 4

PostPosted: Wed Nov 30, 2016 1:07 am    Post subject: Reply with quote

Robots.txt just says the site should not be crawled, it doesnt say that it should not be indexed.

Also as soon as a new Vendor is created, i would have to edit the Robots.txt :/
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Wed Nov 30, 2016 2:12 pm    Post subject: Reply with quote

Who told you that?
Back to top
View user's profile Send private message
RaymondE
Smarty n00b


Joined: 29 Nov 2016
Posts: 4

PostPosted: Wed Nov 30, 2016 3:49 pm    Post subject: Reply with quote

Because i have experience in that field. Any suggestions how i can solve my problem?
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Wed Nov 30, 2016 4:25 pm    Post subject: Reply with quote

Create a separate vhost for vendor subdomains with robots.txt
Code:
User-agent: *
Disallow: *


Robots do not download disallowed content. And since they can't download it, there's nothing to index.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP