Code Monkey home page Code Monkey logo

statamic-anchor-navigation's People

Contributors

doriengr avatar juliawarnke avatar kristiana-s avatar simonerd avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

statamic-anchor-navigation's Issues

How to edit heading output?

Hi

Great add-on, quick question, where do I edit (or add) this?

'heading' => [
    'levels' => [2],
],

I'd like to output h2 and h3. would the correct format be

'heading' => [
    'levels' => [2, 3],
],

Empty headings throw error : Undefined property: stdClass::$content

Hi,
Spotted an issue where an empty heading node would throw an error for no content. This was for entries with linked content , and the content had empty headings.
Undefined property: stdClass::$content

fix was to add an extra check on line 22 of src/Nodes/Heading.php to check that content node exists

if (property_exists($node, 'content') && property_exists($node->content[0], 'text') && !is_null($node->content[0]->text)) {
     $HTMLAttributes['id'] = Str::slug($node->content[0]->text);
}

Happy to create a PR if needed, Thanks for this addon!

Missing context key `entry_id` in live preview

Within the tag we're looking for the entry id within the tag context (see here):

if (! $this->entry = $this->context->get('entry_id')->augmentable()) {
    return null;
}

That seems to work perfectly fine in the frontend โ€“ however, when using the live preview, the entry_id key can not be found within the context. You can find however a key id, which seems to contain the same information. Changing that key should fix this.

Tested in both 3.4 and 4.1, in an existing project and in a fresh install. I don't know if that bug has always been there and we haven't noticed that before, or if any changes caused that problem.

Include set content

Thanks for this extension. It's super easy to implement and works very well.

I was just wondering if you could think of a way to also include content that is stored within a set in bard.

Thanks for your time

Error when used inside replicator

Hi there,

Thanks for this nice addon, it's very easy to use, and does its job almost perfectly. Is say almost, because I have run into an issue when using it inside of a replicator field. If I do that, it throws the following error: Call to a member function augmentable() on string, which seems to occur on vendor/visuellverstehen/statamic-anchor-navigation/src/Tags/AnchorNavigation.php:30.

I have tried to understand what's going on there, but I could not find out in the limited time I have available. Any ideas?

Cheers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.