In Drupal 7, I have created a subtheme from Zen which I am - whenever I have some spare time - slowly developing into the custom theme for one of my websites. Obviously this is a learning experience although I do have a little experience from Drupal 6 several years back.
I have installed Firebug under Firefox and am using it to look at various properties of one of the pages I am theming. My footer message shows an id of "block-block-1" - which I have then used to assign the appropriate CSS property values. I would, however, like to understand where/how that id is generated and did a grep of the entire website looking for that particular id. I only found it in the Zen theme and in my derived subtheme, not in any particular Drupal file.
Could someone who knows Drupal 7 better tell me where that particular id is generated for the footer message?
Thanks.
I haven't worked with zen but it could come from zen. what are you trying to do with that information?
On Tue, May 1, 2012 at 3:21 PM, Hakan agents@meddatainc.com wrote:
In Drupal 7, I have created a subtheme from Zen which I am - whenever I have some spare time - slowly developing into the custom theme for one of my websites. Obviously this is a learning experience although I do have a little experience from Drupal 6 several years back.
I have installed Firebug under Firefox and am using it to look at various properties of one of the pages I am theming. My footer message shows an id of "block-block-1" - which I have then used to assign the appropriate CSS property values. I would, however, like to understand where/how that id is generated and did a grep of the entire website looking for that particular id. I only found it in the Zen theme and in my derived subtheme, not in any particular Drupal file.
Could someone who knows Drupal 7 better tell me where that particular id is generated for the footer message?
Thanks.
-- [ Drupal support list | http://lists.drupal.org/ ]
My question was: do you know where/how it is generated?
On Tue, 1 May 2012 15:26:08 -0500, Gerald Klein wrote:
I haven't worked with zen but it could come from zen. what are you trying to do with that information?
On Tue, May 1, 2012 at 3:21 PM, Hakan agents@meddatainc.com wrote:
In Drupal 7, I have created a subtheme from Zen which I am - whenever I have some spare time - slowly developing into the custom theme for one of my websites. Obviously this is a learning experience although I do have a little experience from Drupal 6 several years back.
I have installed Firebug under Firefox and am using it to look at various properties of one of the pages I am theming. My footer message shows an id of "block-block-1" - which I have then used to assign the appropriate CSS property values. I would, however, like to understand where/how that id is generated and did a grep of the entire website looking for that particular id. I only found it in the Zen theme and in my derived subtheme, not in any particular Drupal file.
Could someone who knows Drupal 7 better tell me where that particular id is generated for the footer message?
Thanks.
-- [ Drupal support list | http://lists.drupal.org/ ]
--
Gerald Klein DBA****
ContactMe@geraldklein.com
www.geraldklein.com http://geraldklein.com/****
jk@zognet.com****
708-599-0352****
Linux registered user #548580
Without warming up a vm no I don't know for sure but like I said it could come from Zen
On Tue, May 1, 2012 at 3:29 PM, Hakan agents@meddatainc.com wrote:
My question was: do you know where/how it is generated?
On Tue, 1 May 2012 15:26:08 -0500, Gerald Klein wrote:
I haven't worked with zen but it could come from zen. what are you trying to do with that information?
On Tue, May 1, 2012 at 3:21 PM, Hakan agents@meddatainc.com wrote:
In Drupal 7, I have created a subtheme from Zen which I am - whenever I have some spare time - slowly developing into the custom theme for one of my websites. Obviously this is a learning experience although I do have a little experience from Drupal 6 several years back.
I have installed Firebug under Firefox and am using it to look at various properties of one of the pages I am theming. My footer message shows an id of "block-block-1" - which I have then used to assign the appropriate CSS property values. I would, however, like to understand where/how that id is generated and did a grep of the entire website looking for that particular id. I only found it in the Zen theme and in my derived subtheme, not in any particular Drupal file.
Could someone who knows Drupal 7 better tell me where that particular id is generated for the footer message?
Thanks.
-- [ Drupal support list | http://lists.drupal.org/ ]
--
Gerald Klein DBA****
ContactMe@geraldklein.com
www.geraldklein.com http://geraldklein.com/****
jk@zognet.com****
708-599-0352****
Linux registered user #548580
-- [ Drupal support list | http://lists.drupal.org/ ]
I'm pretty sure it's the block id, the block that you dropped in your footer region. So if you add another block in there it will have another id (or if you created your first block in the header and a second block in the footer, it will have an id with 2 in it). You're better off with using an id on the the footer container and that's probably defined in your theme page.tpl file.
On 1/05/2012 22:32, Gerald Klein wrote:
Without warming up a vm no I don't know for sure but like I said it could come from Zen
On Tue, May 1, 2012 at 3:29 PM, Hakan <agents@meddatainc.com mailto:agents@meddatainc.com> wrote:
My question was: do you know where/how it is generated? On Tue, 1 May 2012 15:26:08 -0500, Gerald Klein wrote: >I haven't worked with zen but it could come from zen. what are you trying >to do with that information? > >On Tue, May 1, 2012 at 3:21 PM, Hakan <agents@meddatainc.com <mailto:agents@meddatainc.com>> wrote: > >> In Drupal 7, I have created a subtheme from Zen which I am - whenever I >> have some spare time - slowly developing into the custom theme for one >> of my websites. Obviously this is a learning experience although I do >> have a little experience from Drupal 6 several years back. >> >> I have installed Firebug under Firefox and am using it to look at >> various properties of one of the pages I am theming. My footer message >> shows an id of "block-block-1" - which I have then used to assign the >> appropriate CSS property values. I would, however, like to understand >> where/how that id is generated and did a grep of the entire website >> looking for that particular id. I only found it in the Zen theme and in >> my derived subtheme, not in any particular Drupal file. >> >> Could someone who knows Drupal 7 better tell me where that particular >> id is generated for the footer message? >> >> Thanks. >> >> >> >> -- >> [ Drupal support list | http://lists.drupal.org/ ] >> > > > >-- > >Gerald Klein DBA**** > >ContactMe@geraldklein.com <mailto:ContactMe@geraldklein.com> > >www.geraldklein.com <http://www.geraldklein.com> <http://geraldklein.com/>**** > >jk@zognet.com <mailto:jk@zognet.com>**** > >708-599-0352 <tel:708-599-0352>**** > > >Linux registered user #548580 > -- [ Drupal support list | http://lists.drupal.org/ ]--
Gerald Klein DBA
ContactMe@geraldklein.com mailto:ContactMe@geraldklein.com
www.geraldklein.com http://geraldklein.com/
jk@zognet.com mailto:jk@zognet.com
708-599-0352
Linux registered user #548580
That ID is generated by the ID of the block in the database. If you go to example.com/admin/structure/block you'll see a list of blocks, and if you find the block that represents your footer and click on the configure link next to it, you'll see the block ID in the URL. In your case it would look something like:
admin/structure/block/manage/block/1/configure
A common format for CSS IDs for blocks is block-MODULENAME-ID. So in this case your block is provided by the block module (which handles the blocks that you can edit on the blocks page) and it's ID is 1.
-Mike
Hakan wrote:
In Drupal 7, I have created a subtheme from Zen which I am - whenever I have some spare time - slowly developing into the custom theme for one of my websites. Obviously this is a learning experience although I do have a little experience from Drupal 6 several years back.
I have installed Firebug under Firefox and am using it to look at various properties of one of the pages I am theming. My footer message shows an id of "block-block-1" - which I have then used to assign the appropriate CSS property values. I would, however, like to understand where/how that id is generated and did a grep of the entire website looking for that particular id. I only found it in the Zen theme and in my derived subtheme, not in any particular Drupal file.
Could someone who knows Drupal 7 better tell me where that particular id is generated for the footer message?
Thanks.
Thank you Michael, that was helpful. In other words, the block ID is generated programmatically by the block module? It would seem to me that the footer message would use a more "recognizable" id than "block-block-1" - as in my case - being IDed as the first block entered/saved...
On Tue, 01 May 2012 13:45:08 -0700, Michael Prasuhn wrote:
That ID is generated by the ID of the block in the database. If you go to example.com/admin/structure/block you'll see a list of blocks, and if you find the block that represents your footer and click on the configure link next to it, you'll see the block ID in the URL. In your case it would look something like:
admin/structure/block/manage/block/1/configure
A common format for CSS IDs for blocks is block-MODULENAME-ID. So in this case your block is provided by the block module (which handles the blocks that you can edit on the blocks page) and it's ID is 1.
-Mike
Hakan wrote:
In Drupal 7, I have created a subtheme from Zen which I am - whenever I have some spare time - slowly developing into the custom theme for one of my websites. Obviously this is a learning experience although I do have a little experience from Drupal 6 several years back.
I have installed Firebug under Firefox and am using it to look at various properties of one of the pages I am theming. My footer message shows an id of "block-block-1" - which I have then used to assign the appropriate CSS property values. I would, however, like to understand where/how that id is generated and did a grep of the entire website looking for that particular id. I only found it in the Zen theme and in my derived subtheme, not in any particular Drupal file.
Could someone who knows Drupal 7 better tell me where that particular id is generated for the footer message?
Thanks.
-- __________________ Michael Prasuhn 503.512.0822 office mike@mikeyp.net
Each module may define its own IDs. Many people don't realize that the ID is actually a text field in the database, so they just use a numeric counter, as the Block module does. For the Block module, that's probably the best alternative to avoid duplication. In my modules, I prefer an alpha descriptor (or "delta") as that gives me a reminder of what the block is supposed to do. So, for an example, the Weblinks module could have "block-weblinks-random".
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: Hakan
Thank you Michael, that was helpful. In other words, the block ID is
generated programmatically by the block module? It would seem to me that the footer message would use a more "recognizable" id than "block-block-1" - as in my case - being IDed as the first block entered/saved...
The earlier methods would all work. Another option is drupal_html_id($id).http://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_html_id/7
"This function ensures that each passed HTML ID value only exists once on the page."
Lucas
On Tue, May 1, 2012 at 4:40 PM, Ms. Nancy Wichmann nan_wich@bellsouth.netwrote:
Each module may define its own IDs. Many people don't realize that the ID is actually a text field in the database, so they just use a numeric counter, as the Block module does. For the Block module, that's probably the best alternative to avoid duplication. In my modules, I prefer an alpha descriptor (or "delta") as that gives me a reminder of what the block is supposed to do. So, for an example, the Weblinks module could have "block-weblinks-random".
*Nancy* Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
*From:* Hakan Thank you Michael, that was helpful. In other words, the block ID is generated programmatically by the block module? It would seem to me that the footer message would use a more "recognizable" id than "block-block-1" - as in my case - being IDed as the first block entered/saved...
-- [ Drupal support list | http://lists.drupal.org/ ]
Nancy, how do you generate that alpha descriptor? By updating the database from a numeric to a database descriptor or some other way?
On Tue, 1 May 2012 14:40:25 -0700 (PDT), Ms. Nancy Wichmann wrote:
Each module may define its own IDs. Many people don't realize that the ID is actually a text field in the database, so they just use a numeric counter, as the Block module does. For the Block module, that's probably the best alternative to avoid duplication. In my modules, I prefer an alpha descriptor (or "delta") as that gives me a reminder of what the block is supposed to do. So, for an example, the Weblinks module could have "block-weblinks-random".
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: Hakan
Thank you Michael, that was helpful. In other words, the block ID is
generated programmatically by the block module? It would seem to me that the footer message would use a more "recognizable" id than "block-block-1" - as in my case - being IDed as the first block entered/saved...